Search - User list
Full Version: what python environment is used by Houdini Engine in Maya?
Root » Houdini Engine for Maya » what python environment is used by Houdini Engine in Maya?
ben5ch
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
awong
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.
ben5ch
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB