I am trying to import the SciPy library inside Blender version 2.8 and I am having trouble. I can import SciPy outside of Blender.
On my system Blender's Python is installed at
/snap/blender/34/2.81/python
I tried the following answers I found here :
- As suggested here I tried to install ensurepip inside Blenders Python.
- I tried to copy the system Python's SciPy folder to Blender's Python site-packages folder.
Both of the solutions are trying to change Blender's python folder -
/snap/blender/34/2.81/python/lib/python3.7/site-packages/
And when I try them, I get stuck with this error :
"Read-only file system"
Remounting the file system doesn't work either, I am wondering if this has something to do with the way Blender 2.8 is installed using snaps?
What can I try next to get SciPy inside Blender?
/snap/blender/34/2.81/pythoneither. Trypip install scipy --userto install to a local user folder. As long as the python version of pip matches that of blender, I've found this is perhaps the simplest approach, maybe barring venvs. I have installedmatplotlib, scipy, bezier, aubio, gdaland numerous others this way without issue. – batFINGER Dec 26 '19 at 08:57sudo. Personally I would avoid usingsudo pip installfor the local method. Making the 3rd party libraries available to all. Also forgot to mentionplumbumone of my faves. If you cansudo mv(rename) the blender python folder, blender will pick up the matching system python instead. – batFINGER Dec 26 '19 at 09:04--useroption the modules are installed under~/.local/lib/python3.7/site-packages. Is there any way to tell Blender to use site-packages stored under that location? – TheBeautifulOrc Sep 15 '20 at 12:58site.pyor in cmake can't remember.... . Building blender so quite likely this is not standard. Appending it to your sys.path will have the desired result. – batFINGER Sep 15 '20 at 13:10