How to use scipy lib of python in Houdini ?
4286 6 0- newPeak
- Member
- 83 posts
- Joined: Dec. 2005
- Offline
- MarcelPP
- Member
- 18 posts
- Joined: Jan. 2017
- Offline
Hey dude. If you are using Houdini 16.5 or lower try following this link
http://wordpress.discretization.de/houdini/home/advanced-2/installing-and-using-scipy-in-houdini/ [wordpress.discretization.de]
I can't test it for linux and mac but there Houdini uses the native installation. On Windows Houdini has its own python library.
http://wordpress.discretization.de/houdini/home/advanced-2/installing-and-using-scipy-in-houdini/ [wordpress.discretization.de]
I can't test it for linux and mac but there Houdini uses the native installation. On Windows Houdini has its own python library.
- mosberlin
- Member
- 9 posts
- Joined: March 2016
- Offline
I had the same problem using linux. As far the only solution I found was uninstall Houdini then install all packages with pip2 and then reinstall houdini. This was the way how I could use e.g. scipy with houdini.
I tried several things like:
-install pip for the local python version of houdini
-copy the numpy repository (github) and try to install it with the local python version of houdini
without success.
Hope this helps
I tried several things like:
-install pip for the local python version of houdini
-copy the numpy repository (github) and try to install it with the local python version of houdini
without success.
Hope this helps
- MarcelPP
- Member
- 18 posts
- Joined: Jan. 2017
- Offline
- MarcelPP
- Member
- 18 posts
- Joined: Jan. 2017
- Offline
My greatest hope:
When installing a version of scipy, I copy over the folders from anaconda2
scipy
scipy-1.1.0-py2.7.egg-info
into C:\Program Files\Side Effects Software\Houdini 17.5.173\python27\lib
then get this error when trying to import scipy in a python node e.g. from scipy.sparse import csr_matrix
Python error: Traceback (most recent call last):
File “”, line 1, in
File “C:\PROGRA~1\SIDEEF~1\HOUDIN~1.173\python27\lib\site-packages\scipy\__init__.py”, line 77, in
from . import _distributor_init
ImportError: cannot import name _distributor_init
according to this source: https://stackoverflow.com/questions/48423782/importerror-cannot-import-name-distributor-init [stackoverflow.com]
I can comment out the import _distributor_init and in the __init__.py so after that I get this message:
Error
Python error: Traceback (most recent call last):
File “”, line 1, in
File “C:\PROGRA~1\SIDEEF~1\HOUDIN~1.173\python27\lib\site-packages\scipy\__init__.py”, line 119, in
from scipy._lib._ccallback import LowLevelCallable
File “C:\PROGRA~1\SIDEEF~1\HOUDIN~1.173\python27\lib\site-packages\scipy\_lib\_ccallback.py”, line 1, in
from . import _ccallback_c
ImportError: DLL load failed: The specified module could not be found.
I think this error goes back to the _ctypes.pyd in C:\Program Files\Side Effects Software\Houdini 17.5.173\python27\dlls
placing the_ctypes.pyd into that folder makes Houdini not start up anymore.
What now? Can anyone help out? Especially if you have windows, please write us if anything worked for you.
thanks in advance.
When installing a version of scipy, I copy over the folders from anaconda2
scipy
scipy-1.1.0-py2.7.egg-info
into C:\Program Files\Side Effects Software\Houdini 17.5.173\python27\lib
then get this error when trying to import scipy in a python node e.g. from scipy.sparse import csr_matrix
Python error: Traceback (most recent call last):
File “”, line 1, in
File “C:\PROGRA~1\SIDEEF~1\HOUDIN~1.173\python27\lib\site-packages\scipy\__init__.py”, line 77, in
from . import _distributor_init
ImportError: cannot import name _distributor_init
according to this source: https://stackoverflow.com/questions/48423782/importerror-cannot-import-name-distributor-init [stackoverflow.com]
I can comment out the import _distributor_init and in the __init__.py so after that I get this message:
Error
Python error: Traceback (most recent call last):
File “”, line 1, in
File “C:\PROGRA~1\SIDEEF~1\HOUDIN~1.173\python27\lib\site-packages\scipy\__init__.py”, line 119, in
from scipy._lib._ccallback import LowLevelCallable
File “C:\PROGRA~1\SIDEEF~1\HOUDIN~1.173\python27\lib\site-packages\scipy\_lib\_ccallback.py”, line 1, in
from . import _ccallback_c
ImportError: DLL load failed: The specified module could not be found.
I think this error goes back to the _ctypes.pyd in C:\Program Files\Side Effects Software\Houdini 17.5.173\python27\dlls
placing the_ctypes.pyd into that folder makes Houdini not start up anymore.
What now? Can anyone help out? Especially if you have windows, please write us if anything worked for you.
thanks in advance.
- orr
- Member
- 98 posts
- Joined: Jan. 2008
- Offline
As far as I know the python distribution that comes with Houdini on Windows was compiled with Visual Studio 2017. You can read this of from the first line in the python shell
Python 2.7.15 (default, Jan 13 2019, 12:40:45) on win32
So whatever you want to add to Houdini on Windows needs to be compiled with the same version ( MSC v.1916 ). Unfortunately, I wasn't able to find any scipy binaries compiled with this particular compiler for python 2.7. So I guess if you don't want to compile it yourself, and sesi cannot do that for you, it might challenging to get it to work.
Depending on your usecase there might be certain workarounds possible. But all of them are not ideal.
Please let me know if you find any solution working for you.
Python 2.7.15 (default, Jan 13 2019, 12:40:45) on win32
So whatever you want to add to Houdini on Windows needs to be compiled with the same version ( MSC v.1916 ). Unfortunately, I wasn't able to find any scipy binaries compiled with this particular compiler for python 2.7. So I guess if you don't want to compile it yourself, and sesi cannot do that for you, it might challenging to get it to work.
Depending on your usecase there might be certain workarounds possible. But all of them are not ideal.
Please let me know if you find any solution working for you.
- jpparkeramnh
- Member
- 178 posts
- Joined: Jan. 2013
- Offline
Have you looked into Conda?
https://conda.io/en/latest/ [conda.io]
https://www.anaconda.com/distribution/ [www.anaconda.com]
Granted, I've only tested it with Linux, but perhaps there are similar builds out there in the user channels.
https://conda.io/en/latest/ [conda.io]
https://www.anaconda.com/distribution/ [www.anaconda.com]
Granted, I've only tested it with Linux, but perhaps there are similar builds out there in the user channels.
-
- Quick Links