0
$\begingroup$

I'm trying to install modules (one of them is open3d) with pip command.
From 2.8+ it should be easy as pip install open3d (mentioned here or here), but ...

cd /.../Blender\ 92.app/Contents/Resources/2.92/python/bin
python3.7m -m pip install open3d

results with Terminal report

zsh: command not found: python3.7m

The last one thread I found was a notification - pip is installed from 2.8+ for Win, but not for Linux/Mac builds. So I wanted to install pip with ensurepip as mentioned here ... into Blender's bin folder (where python3.7 file is stored) with command ...

python3.7m -m ensurepip

... but it fails with the same report

zsh: command not found: python3.7m
$\endgroup$
8
  • $\begingroup$ Have you tried just python -m pip install ... (from within the bin folder) $\endgroup$ – WhatAMesh Feb 13 at 21:11
  • $\begingroup$ sure, but it goes to Mac's Python with report "...Python: No module named pip" $\endgroup$ – vklidu Feb 13 at 21:33
  • $\begingroup$ Related blender.stackexchange.com/questions/5287/… @vklidu do you have an installed system python matching blender pythons version? If so (IMO) it is sometimes simplest to pip install foo --user to have 3rd party module available for both system and blender python of same version. $\endgroup$ – batFINGER Feb 14 at 16:13
  • $\begingroup$ @batFINGER No, system python is 2.7 on Catalina for some reason, so I don't want to break something (also it was recommended reddit.com/r/learnpython/comments/fux0iv/… to keep it untouched and rather install python3 within into virtual envi) and also don't install modules globally. So it sounds as more problems for me ... $\endgroup$ – vklidu Feb 14 at 16:42
  • $\begingroup$ @vklidu No?? , by system, meant on the system (as opposed to blender python install) eg via a pyenv, (not changing your system's default python) . stackoverflow.com/questions/42988977/… As noted in 3rd party link can remove (rename) blenders python folder and use a matching version on your system. $\endgroup$ – batFINGER Feb 14 at 17:01
0
$\begingroup$

For some reason using cd to blender's python bin folder and then executed command was not working, but ... path to blender's bin folder with python3.7m + command executed at once worked just fine.


Do I have a "pip"?

I don't know if 2.80 was distributed without a pip (as mentioned above), but 2.79 and also 2.83 Mac build containes a pip ... executing ensurepip was satisfied. You can check that by right click on Blender.app icon > Show Package Contents > Contents > Resources > 2.9x > python > bin, drag&drop bin folder into Terminal window, type python3.7m -m ensurepip and execute. In my case it looked like ...

/Users/Filip/Downloads/Blender\ 92.app/Contents/Resources/2.92/python/bin/python3.7m -m ensurepip

Upgrade "pip"

Terminal recommend update pip to latest version. So copy&paste directory of bin folder or drag&drop bin folder again into Terminal window, type python3.7m -m pip install --upgrade pip and execute. My example ...

/Users/Filip/Downloads/Blender\ 92.app/Contents/Resources/2.92/python/bin/python3.7m -m pip install --upgrade pip

Module installation

From what I tried, even without pip care I could just install module by command
python3.7m -m pip install + type your module name. In my case open3d module...

/Users/filip/Downloads/Blender\ 92.app/Contents/Resources/2.92/python/bin/python3.7m -m pip install open3d
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.