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$

2 Answers 2

2
$\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$
0
$\begingroup$

Not a solution but I am using Blender 2.91. Also trying to install a module. The reason we can't install pip is because its already there in the following folder \python\lib\ensurepip

now my weird curiosity found this in the python console, type import ensurepip and we get a ensurepip function

>>> ensurepip.
              bootstrap(
              os
              pkgutil
              sys
              tempfile
              version(

type import pip get the pip function with a twist.... pip. and tab does not reveal functions

pip with a space and letter then tab, reveal some functions.

>>> pip i
         d(
         f 
         mport 
         n 
         nf
         nput(
         nt(
         nterpolate
         s 
         sclose(
         sfinite(
         sinf(
         sinstance(
         snan(
         ssubclass(
         ter(

GREAT!!! still don't know how to install a exif

Hope this helps after a year and half :)

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .