IHi all,
I am having problems importing hou from a Regular Python Shell. I am using latest versions of Python25, PyDev, Eclipse and Houdini. I have set the system PATH and PYTHONPATH as suggested in the docs, but I get this message when I ‘import hou’:
Traceback (most recent call last):
File “D:\Documents\Eclipse\z_Houdini_test2\test3.py”, line 18, in <module>
import hou
File “CPROGRA~1/SIDEEF~1/HOUDIN~1.295/houdini/scripts/python\hou.py”, line 17, in <module>
import _hou
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
When I change the Python interpreter from the standard Python25 to the one in Houdini, then it seems to work fine.
Any ideas why this is happening? I found some people having similar issues a while back, but there was no solution. Just wondering if this had now been resolved?
cheers
Patrick
import hou
14858 9 3- phtj
- Member
- 224 posts
- Joined: June 2009
- Offline
- edward
- Member
- 7899 posts
- Joined: July 2005
- Offline
- phtj
- Member
- 224 posts
- Joined: June 2009
- Offline
Hi Edward,
Thanks - that explains that problem.
So both $HFS/python/bin/python.exe and $HFS/bin/hython.exe are compiled with the right compiler. Both of these give no errors when I import hou.
Now onto the next issue - I want to run this code:
import hou
print hou.node('/obj').createNode('geo')
When I run this using Houdini's hython.exe, it seems to work fine. But when I run it using Houdini's python.exe, I get this message:
Obviously, houdini.exe is doing something that python.exe is not, but I am not sure what. Any suggestions?
cheers
patrick
Thanks - that explains that problem.
So both $HFS/python/bin/python.exe and $HFS/bin/hython.exe are compiled with the right compiler. Both of these give no errors when I import hou.
Now onto the next issue - I want to run this code:
import hou
print hou.node('/obj').createNode('geo')
When I run this using Houdini's hython.exe, it seems to work fine. But when I run it using Houdini's python.exe, I get this message:
cpp error: “CPROGRA~1/SIDEEF~1/HOUDIN~1.295/houdini/soho/parameters/RIB3Delight8.5.ds”:5 Unable to include “CPROGRA~1/SIDEEF~1/HOUDIN~1.295/python/houdini/soho/parameters/CommonMacros.ds”
cpp error: “CPROGRA~1/SIDEEF~1/HOUDIN~1.295/houdini/soho/parameters/RIB3Delight8.5.ds”:72 Unable to include “CPROGRA~1/SIDEEF~1/HOUDIN~1.295/python/houdini/soho/parameters/CommonControl.ds”
cpp error: “CPROGRA~1/SIDEEF~1/HOUDIN~1.295/houdini/soho/parameters/RIB3Delight8.5.ds”:73 Unable to include “CPROGRA~1/SIDEEF~1/HOUDIN~1.295/python/houdini/soho/parameters/CommonView.ds”
cpp error: “CPROGRA~1/SIDEEF~1/HOUDIN~1.295/houdini/soho/parameters/RIB3Delight8.5.ds”:74 Unable to include “CPROGRA~1/SIDEEF~1/HOUDIN~1.295/python/houdini/soho/parameters/CommonObject.ds”
cpp error: “CPROGRA~1/SIDEEF~1/HOUDIN~1.295/houdini/soho/parameters/RIB3Delight8.5.ds”:75 Unable to include “CPROGRA~1/SIDEEF~1/HOUDIN~1.295/python/houdini/soho/parameters/Instance.ds”
geo1
Obviously, houdini.exe is doing something that python.exe is not, but I am not sure what. Any suggestions?
cheers
patrick
Patrick
- phtj
- Member
- 224 posts
- Joined: June 2009
- Offline
I came back to this problem recently - and I am still having the same problem. (I am using windows). If I start /python/bin/python2.5.exe, and do:
>>> import sys, os
>>> sys.path.append(os.environ+“/houdini/scripts/python”)
>>> import hou
At first it looks like it works. But then anything I do after that gives an invalid syntax error.
>>> hou
File “<stdin>”, line 1
hou
^
SyntaxError: invalid syntax
Is this a bug on windows?
>>> import sys, os
>>> sys.path.append(os.environ+“/houdini/scripts/python”)
>>> import hou
At first it looks like it works. But then anything I do after that gives an invalid syntax error.
>>> hou
File “<stdin>”, line 1
hou
^
SyntaxError: invalid syntax
Is this a bug on windows?
Patrick
- edward
- Member
- 7899 posts
- Joined: July 2005
- Offline
- kursad
- Member
- 88 posts
- Joined: March 2010
- Offline
- edward
- Member
- 7899 posts
- Joined: July 2005
- Offline
- pelos
- Member
- 621 posts
- Joined: Aug. 2008
- Offline
i downloaded houdini apprentice 12.5 64bits with vc9
and i am trying to make a small script outside houdini
i got the python versión from here.
http://www.python.org/download/releases/2.6.8/ [python.org]
but not sure what the vc9 suppost to be .
do i need to download another versión of python?
thanks guys.
and i am trying to make a small script outside houdini
i got the python versión from here.
http://www.python.org/download/releases/2.6.8/ [python.org]
but not sure what the vc9 suppost to be .
do i need to download another versión of python?
thanks guys.
- NicTanghe
- Member
- 212 posts
- Joined: Dec. 2016
- Online
Hello I`m here to report I`ve tried some the internet solutions and none of them seem to work.
Anny advice is welcome.
Im on Linux with vscode. Below are some of my settings.
( i also have the problem that the tmp.py files aren`t actually linked)
Anny advice is welcome.
Im on Linux with vscode. Below are some of my settings.
( i also have the problem that the tmp.py files aren`t actually linked)
"python.autoComplete.extraPaths": ["/opt/hfs19.5/python/lib"], "python.autoComplete.preloadModules": ["hou"], "terminal.integrated.env.linux": { "PYTHONPATH" : "/opt/hfs19.5/houdini/python/lib"}, "python.analysis.extraPaths": [ "/opt/hfs19.5/python/lib" ],
Edited by NicTanghe - Sept. 5, 2023 03:58:28
- jjayakumar
- Member
- 106 posts
- Joined: June 2011
- Offline
NicTanghe
Hello I`m here to report I`ve tried some the internet solutions and none of them seem to work.
Anny advice is welcome.
Im on Linux with vscode. Below are some of my settings.
( i also have the problem that the tmp.py files aren`t actually linked)"python.autoComplete.extraPaths": ["/opt/hfs19.5/python/lib"], "python.autoComplete.preloadModules": ["hou"], "terminal.integrated.env.linux": { "PYTHONPATH" : "/opt/hfs19.5/houdini/python/lib"}, "python.analysis.extraPaths": [ "/opt/hfs19.5/python/lib" ],
Hi Nic,
It should be pointing to python3.9 libs instead. Try this
"python.autoComplete.extraPaths": ["/opt/hfs19.5/houdini/python3.9libs"], "python.autoComplete.preloadModules": ["hou"], "terminal.integrated.env.linux": { "PYTHONPATH" : "/opt/hfs19.5/houdini/python3.9libs"}, "python.analysis.extraPaths": [ "/opt/hfs19.5/houdini/python3.9libs" ],
-J
-
- Quick Links