I'm trying to use the Houdini Python module that ships with the application and is part of Houdini's installation folder, outside the standard Python paths. After following the installation instructions, running the Houdini Terminal 16.5.571 script and adding /Applications/Houdini/Houdini16.5.571/Frameworks/Houdini.framework/Versions/Current/Resources/houdini/python2.7libs
to _virtualenv_path_extensions.pth
in my site-packages
folder the hou
module can be imported, the Python part that is. However it fails loading the dynamic libraries.
Error message
Traceback (most recent call last):
File "myscript.py", line 7, in <module>
import hou
File "/Applications/Houdini/Houdini16.5.571/Frameworks/Houdini.framework/Versions/Current/Resources/houdini/python2.7libs/hou.py", line 19, in <module>
import _hou
ImportError: dlopen(/Applications/Houdini/Houdini16.5.571/Frameworks/Houdini.framework/Versions/Current/Resources/houdini/python2.7libs/_hou.so, 2): Library not loaded: @rpath/Houdini.framework/Versions/16.5.571/Houdini
Referenced from: /Applications/Houdini/Houdini16.5.571/Frameworks/Houdini.framework/Versions/Current/Resources/houdini/python2.7libs/_hou.so
Reason: image not found
All files and folders mentioned in the error message are located within the Houdini path /Applications/Houdini/Houdini16.5.571/Frameworks/Houdini.framework/Versions/Current
with Current
being a symlink to 16.5.571
.
Python module
Resources/houdini/python2.7libs/hou.py
The Python module is found.
Shared libraries
Resources/houdini/python2.7libs/_hou.so`
This contains a a reference to @rpath/Houdini.framework/Versions/16.5.571/Houdini
which it is presumably trying to look up.
Houdini
This seems to link to the actual dylib
files, containing @loader_path/Libraries
and dylib...@rpath/libHoudiniUI
etc. and many others.
I read here Cannot find dynamic library when running a Python script from Bazel that SIP may be causing it but even after ln -s
the shared libraries into /usr/local/lib
the error still occured.
I am using pyenv
but tried with the system Python environment, resulting in the same behaviour.
Any suggestions?