0
$\begingroup$

I'm trying to install numpy/scipy on Blender's internal python compiler.

On my computer, the python compiler is located at:

/Applications/blender 2.80/Blender.app/Contents/Resources/2.80/python

Running the commands:

cd /Applications/blender2.80/Blender.app/Contents/Resources/2.80/python
./bin/python3.7m -m ensurepip

I get:

Requirement already satisfied: setuptools in ./lib/python3.7/site-packages (39.0.1)
Requirement already satisfied: pip in ./lib/python3.7/site-packages (10.0.1)

This means that pip is already installed in Blender 2.80. However, from this point, I don't know how to proceed. Any help?

$\endgroup$
0
$\begingroup$

It is probably possible to use blender's built-in version of python to get a package using pip, but there are many difficulties with that route, as you are most likely finding yourself.

Luckily, blender also has an easier way to install python packages.

If you go to preferences > File Paths > Data (shown below), you can add python packages to blender. prefs

The Scripts field can be used to specify a location for blender to look for external packages. You can install packages to any location (even using your system python), and then tell blender to just look for the packages in the folder with the python packages.

To quote from another answer, "Note that this folder must contain 3 sub-directories : addons, modules, and startup. So you can install the library in the modules folder."

Another option is to install packages into the lib subfolder inside the blender application. If your system python matches the blender python, you might be able to do that with normal pip while specifying a new install location.

See this answer for more details and strategies.

$\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.