what python environment is used by Houdini Engine in Maya?

   3813   2   1
User Avatar
Member
76 posts
Joined: March 2007
Offline
Hi there,

I'm having some trouble here with using certain Python modules inside a Pre/Post Frame script.

Following Python code gives different results:
import sys; print ‘P4’ in sys.modules.keys(); import P4; print ‘P4’ in sys.modules.keys()
in Maya shell it gives: TrueTrue
in Houdini shell is gives: FalseTrue
inside Houdini as Pre/Post Frame script it gives: FalseTrue

inside Maya using Engine Plugin and in Pre/post script in an HDA is gives: False
So it seems to break where it tries to import P4. I guess its not in the right path. Or there is no path at all..

anyone?

cheers,
benS
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Yeah, it seems like the import is failing somehow. Were there any errors printed out?

Maybe the P4 module has library conflicts when being loaded into this environment. The environment variables to check would be PYTHONPATH, LD_LIBRARY_PATH (for Linux), and PATH (for Windows). If you have different P4 module (and libraries) for Maya and Houdini, you'd want to use the Maya one under Houdini Engine.
Andrew / アンドリュー
User Avatar
Member
76 posts
Joined: March 2007
Offline
Thanx… it's solved by doing a sys.path.append() here and there.
There was also some confusion about which paths where loaded in Maya.

cheers,
benS
  • Quick Links