How to load external modules/packages into blender python I have a bunch of modules that I had previously installed using pip to my system python 2.7. What do I need to do in order to be able to import this module in the blender python console, as well as within my python scripts in blender? (The module in question is called ProDy).

EDIT: I installed pyenv and installed the same version of python as my blender version (3.5.3) uses through it. I then made this version active, and installed the packages I need with pip3 install. I can load the packages in terminal, but not in the blender python console. What am I missing?
For pip-installable dependencies (like PyPI or wheels), all you need to do is the following:


Locate your Blender's Python binary path, let's call it &lt;BPYTHON&gt; (in my case 2.80/python/bin/python3.7m at the Blender installation).
Run the following to enable pip operations in bpython:


&lt;BPYTHON&gt; -m ensurepip
&lt;BPYTHON&gt; -m pip install --upgrade pip



Now any time you want to install a package simply call pip from bpython:


&lt;BPYTHON&gt; -m pip install &lt;YOUR_PACKAGE&gt;  # no --user needed
&lt;BPYTHON&gt; -m pip install &lt;PATH/TO/WHEEL&gt;.whl  # also works with wheels as expected


As usual, you just have to install a package once and uninstalling works the analogous way.

Blender's Python has its own environment, so this procedure will install the dependencies there (in my case the 2.80/python folder). AFAIK this will work irrespectively of your OS, system's Python version and Blender location so I found this to be most convenient. You can encounter some issues if installing cython-related packages like tkinter but this can also be fixed as I did here.

Let me know if this works out!
Cheers,
Andres