Jump to content

HOM from shell in macOS


jamesr

Recommended Posts

Hi there,

Has anyone had any success with importing the hou module from python in a shell on macOS? I am currently running Mojave 10.14.1 with stock python 2.7.10 (fresh OS install) on my laptop, and have not been able to get it up and running. I found a couple of threads related to it from a few years ago suggesting it's not possible, but I sort of figured it would be mentioned in the docs that it's incompatible on macOS. So maybe I'm missing something? 

Python 2.7.10 (default, Aug 17 2018, 17:41:52) 
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hou
dyld: warning, LC_RPATH $ORIGIN/. in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libopenvdb_sesi.dylib being ignored in restricted program because it is a relative path
dyld: warning, LC_RPATH $ORIGIN/. in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libopenvdb_sesi.dylib being ignored in restricted program because it is a relative path
dyld: warning, LC_RPATH $ORIGIN/. in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libopenvdb_sesi.dylib being ignored in restricted program because it is a relative path
dyld: warning, LC_RPATH $ORIGIN/. in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libopenvdb_sesi.dylib being ignored in restricted program because it is a relative path
dyld: warning, LC_RPATH $ORIGIN/. in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libopenvdb_sesi.dylib being ignored in restricted program because it is a relative path
dyld: warning, LC_RPATH $ORIGIN in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/./libblosc.1.dylib being ignored in restricted program because it is a relative path
dyld: warning, LC_RPATH $ORIGIN in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libblosc.dylib being ignored in restricted program because it is a relative path
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Applications/Houdini/Current/Frameworks/Houdini.framework/Versions/Current/Resources/houdini/python2.7libs/hou.py", line 19, in <module>
    import _hou
ImportError: dlopen(/Applications/Houdini/Current/Frameworks/Houdini.framework/Versions/Current/Resources/houdini/python2.7libs/_hou.so, 2): Library not loaded: /Users/prisms/builder-new/WeeklyDevToolsHEAD/dev_tools/local/lib/libz.1.dylib
  Referenced from: /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libAlembic_sidefx.1.7.9.dylib
  Reason: image not found

According to the docs, you need to 

import DLFCN
    sys.setdlopenflags(old_dlopen_flags | DLFCN.RTLD_GLOBAL)

But there is no DLFCN module for macOS.
Python docs suggest generating DLFCN if it's not available, though /usr/include does not exist. I'm not really familiar with these dl related commands.

I found this link and tried to just manually replace

DLFCN.RTLD_GLOBAL

to -1, which got rid of a lot of errors except  

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Applications/Houdini/Current/Frameworks/Houdini.framework/Versions/Current/Resources/houdini/python2.7libs/hou.py", line 19, in <module>
    import _hou
ImportError: image not already loaded

I also tried the otool steps here which did not seem to change anything. Not really sure where to go from here. 

Thanks!!

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...