import hou in an external IDE?

   11473   9   1
User Avatar
Member
82 posts
Joined: Oct. 2007
Offline
hello,
I have try this but it doesnt work:

sys.path.append(“C:\Program Files\Side Effects Software\Houdini 9.0.782\python”)

import hou

I have also try to use the same path in my env path…

Any idea?

I am using wing BTW.

tky
User Avatar
Staff
2593 posts
Joined: July 2005
Offline
labuzz
hello,
I have try this but it doesnt work:

sys.path.append(“C:\Program Files\Side Effects Software\Houdini 9.0.782\python”)

import hou

I have also try to use the same path in my env path…

Any idea?

I am using wing BTW.

tky

Try

sys.path.append(“C:\Program Files\Side Effects Software\Houdini 9.0.782\houdini\scripts\python”)
import hou
User Avatar
Member
82 posts
Joined: Oct. 2007
Offline
Arf sorry about this stupid mistake ops:

But it doesnt work. I am getting an error now. python.exe can't run because libHOMF.dll is missing ( DLL load failed.File …“…\hou.py” line14 in <module>
import _hou )

it looks like this dll is here :C:\Program Files\Side Effects Software\Houdini 9.0.782\bin

what shoukd I do?
User Avatar
Staff
4445 posts
Joined: July 2005
Offline
You should add that bin directory to sys.path as well.

Mark
User Avatar
Member
82 posts
Joined: Oct. 2007
Offline
I have already tried to add this:
sys.path.append(“C:\Program Files\Side Effects Software\Houdini 9.0.782\bin”)

and this also:
C:\Program Files\Side Effects Software\Houdini 9.0.782\python\lib\python2.5

When I copy the missing DLL in :
C:\Program Files\Side Effects Software\Houdini 9.0.782\houdini\scripts\python

A new missing DLL pops…Not sure if I should copy all the dir.
It works for you?
User Avatar
Member
63 posts
Joined: July 2005
Offline
You must append all directories that houdini uses for sys.path to your custom script. Print sys.path in houdini's python shell and append them all (there are quite a few of them, some of them non-existing). What I get is:

$HFS\python\lib\python2.5
$HFS\bin\python25.zip
$HFS\python\DLLs
$HFS\python\lib
$HFS\python\lib\plat-win
$HFS\python\lib\lib-tk
$HFS\bin
$HFS\python
$HFS/houdini/scripts/python
User Avatar
Member
82 posts
Joined: Oct. 2007
Offline
Tks diula but nope it doesnt work either…I am still getting the same message.
are you using an external IDE too? ( I am on XP).
User Avatar
Member
63 posts
Joined: July 2005
Offline
Yes, I just tested in python's idle, and in Scite as well. Works fine.

This is the simple test I've tried:

import sys

sys.path.append(“G:\\Software\\Side_Effects_Software\\Houdini_9.0.783\\python\\lib\\python2.5”)
sys.path.append(“G:\\Software\\Side_Effects_Software\\Houdini_9.0.783\\bin\\python25.zip”)
sys.path.append(“G:\\Software\\Side_Effects_Software\\Houdini_9.0.783\\python\\DLLs”)
sys.path.append(“G:\\Software\\Side_Effects_Software\\Houdini_9.0.783\\python\\lib”)
sys.path.append(“G:\\Software\\Side_Effects_Software\\Houdini_9.0.783\\python\\lib\\plat-win”)
sys.path.append(“G:\\Software\\Side_Effects_Software\\Houdini_9.0.783\\python\\lib\\lib-tk”)
sys.path.append(“G:\\Software\\Side_Effects_Software\\Houdini_9.0.783\\bin”)
sys.path.append(“G:\\Software\\Side_Effects_Software\\Houdini_9.0.783\\python”)
sys.path.append(“G:\\Software\\Side_Effects_Software\\Houdini_9.0.783\\houdini\\scripts\\python”)

import hou

print dir(hou.node)
print dir(hou.parm)



p.s. I have also added $HFS/bin to my PATH envvar.
User Avatar
Member
1 posts
Joined: July 2007
Offline
hi

i have the same problem, and have tried fixing it as suggested here. however, i now get a pop-up windows runtime error R6034 saying python.exe has made an attempt to load the C runtime incorrectly

i'm running 9.5.170 vc8 on vista 32, and python 2.5.2 from a console

any ideas what might be wrong?
mac
User Avatar
Member
10 posts
Joined: July 2006
Offline
Trying to import hou in Ipython on OS X

1) In the Houdini Python shell I ‘import sys’ and ‘print sys.path’:

Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:16)
on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import sys
>>> print sys.path
['', ‘/usr/local/lib/wxPython-ansi-2.8.8.1/lib/python2.5/site-packages’, ‘/usr/local/lib/wxPyt
hon-ansi-2.8.8.1/lib/python2.5/site-packages/wx-2.8-mac-ansi’, ‘/System/Library/Frameworks/Pyt
hon.framework/Versions/2.5/lib/python25.zip’, ‘/System/Library/Frameworks/Python.framework/Ver
sions/2.5/lib/python2.5’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python
2.5/plat-darwin’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat
-mac’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-sc
riptpackages’, ‘/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python’, ‘
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk’, ‘/System/Libra
ry/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload’, ‘/Library/Python/2.5/s
ite-packages’, ‘/usr/local/lib/wxPython-ansi-2.8.8.1/lib/python2.5’, ‘/System/Library/Framewor
ks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC’, ‘/Library/Frameworks/Houdini.frame
work/Versions/9.5.264/Resources/houdini/scripts/python’, ‘/Library/Frameworks/Houdini.framewor
k/Versions/9.5.264/Resources/houdini/scripts/pythonlibs’]
>>>
  • Quick Links