import hou from maya python shell

   5452   3   1
User Avatar
Member
1 posts
Joined: July 2009
Offline
Hello,

I am trying to use the hou module from inside a maya python shell and I'm getting the error…

# Error: DLL load failed: The specified module could not be found.
# Traceback (most recent call last):
# File “<maya console>”, line 5, in <module>
# File “CProgram Files/Side Effects Software/Houdini 10.0.295/houdini/scripts/python\hou.py”, line 17, in <module>
# import _hou
# ImportError: DLL load failed: The specified module could not be found. #

I have also tried it from my external python shell which gives the error “This application has failed to start because libHOMF.dll was not found.”

I am running vista with 64 bit houdini and 64 bit Python25 both use . I read an old post that said the houdini compiler and the python compiler need to match but i am still getting the error.

Has anyone found out any more about this problem? Anyone know if its possible to use hou in maya?

Cheers!
User Avatar
Member
7709 posts
Joined: July 2005
Offline
It sounds like a path issue to me then. Try putting the value of $HFS/bin into your PATH environment variable for Maya.
User Avatar
Staff
121 posts
Joined: Oct. 2010
Offline
you'll probably need to set the PATH environment variable to

C/Program Files/Side Effects Software/Houdini 10.0.295/bin
Side Effects Technical Support
User Avatar
Member
5 posts
Joined: April 2013
Offline
I've tried this (and many other ideas) but without success
Is anybody succeed running importing hou in Maya python (or PyMel, maya.cmds or maya.api.OpenMaya in Houdini python)?
I can't find any solution on net.

closest I to solution is to set PyCharm to search for modules inside maya devkit (while in Houdini python interpreter and completition works) but I'm getting folowing results:
" …
Traceback (most recent call last):
File “UposterToolsBase/mayaScripts/removeNamespace.py”, line 1, in <module>
import maya.api.OpenMaya as om
File “C:\Program Files\Autodesk\Maya2018\Python\Lib\site-packages\maya\api\OpenMaya.py”, line 25, in <module>
import maya.api._OpenMaya_py2
ImportError: DLL load failed: The specified module could not be found. …"


I don't get how it can find “first” instance (OpenMaya.py) but then it can't find “maya.api._OpenMaya_py2”.
I have merged Maya devkit paths and houdini paths in PyCharm for both maya python and houdini python.
Maya imports works in maya python, but import hou does not.

I'm (unfortunately) on Win10 and need this to work on Win10 since that is what we use at company.
Houdini imports works in houdini interpreter but maya imports does not.
Edited by tomVujnovic - Nov. 23, 2018 12:44:34
  • Quick Links