Closed ShungJhon closed 1 year ago
Hello @ShungJhon ,
It seems that pip is installed locally (in your "/home/vatis/.local" folder). Maybe you don't have write permissions to install it system wise (in the blender folder).
When you use the command: blender --background --python-expr "import pip"
, it did not load your local python libraries.
To load pip library in the python, you should tell python to access this local folder like this:
import sys
sys.path.append("/home/vatis/.local/lib/python3.9/site-packages")
# Then you can load pip
import pip
Tell me if it works
Best,
@Mathux Thank you very much. It worked.
I tried to use snap to install the blender 2.93lts/stable. And I've used
/path/to/blender/python -m ensurepip --upgrade.
It returned as follows:It seems that pip was installed in the system python but not this builtin python. Because when I used:
blender --background --python-expr "import pip"
It returned:But all these worked for me when I followed your instruction on my mac. Did you know any solution to these? THX