I am trying to install some libraries like opencv-python and mediapipe in Blender (Windows 10, Blender version 3.0). I have used the following commands to install opencv:
cd [Navigate to where python.exe is in blender folder]
The path is:
C:\Program Files\Blender Foundation\Blender 3.0\3.0\python\bin
In command prompt I execute the following statement:
python.exe -m pip install opencv-python
This gives me the following message:
Defaulting to user-installation because normal site package is not writeable
I already have anaconda3 (python-spyder installed on my windows system which I am using for other ML work). So is it possible that installation is causing some clashes?
I also tried the following script:
import subprocess
import sys
subprocess.check_call([sys.executable, "-m", "ensurepip"])
subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade", "pip"])
subprocess.check_call([sys.executable,"-m","pip","install","opencv-python"])
subprocess.check_call([sys.executable,"-m","pip","install","opencv-contrib-python"])
subprocess.check_call([sys.executable, "-m", "pip", "install", "mediapipe"])
After the script is executed, when I try to import cv2/mediapipe I am getting no module found error.
Any ideas on how I can resolve this issue?
conda deactivatetwice. However, in case Anaconda is just completely unrelated, try running your command line as an administrator and try installing Blender outside of special folders like Program Files. – Markus von Broady Feb 16 '22 at 10:02