houdini python and panda

I have a problem when I try to use panda modules in Houdini python. F.e. when I am trying to create an object EggData I get a message:

>>> from pandac.PandaModules import EggData
>>> eggdata = EggData()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
TypeError: EggData.EggData() argument 0 must be EggData, not tuple

I suppose this error is because panda libraries have been compiled for python2.6, but Houdini uses python2.5.2… Any ideas how could I avoid such problem?

By the way, these are linux64 versions of panda3d and houdini.

Thanks in advance!

You can avoid these problems by one of two ways:

(1) Don’t use Python 2.6, use Python 2.5, which Panda was compiled against.
(2) Get Panda and compile it yourself against Python 2.6.

Like any other compiled extension module, Panda can only be run against the particular version of Python it was compiled against.


Actually, Panda is compiled against Python 2.6, if that was the default version of Python for your linux distro. But I’m seeing that the problem was the other way around.

What linux distro & version do you have?

I have tried to install python2.5 additionally to my system. if I change my default python version from 2.6 to 2.5 I get an exception in my program:

Traceback (most recent call last):
  File "/home/si/NetBeansProjects/magicbox/main.py", line 1, in <module>
    from controller.cameracontrollermgr import cameraCtrlMgr
  File "/home/si/NetBeansProjects/magicbox/controller/cameracontrollermgr.py", line 1, in <module>
    from direct.showbase.PythonUtil import Singleton
  File "/usr/share/panda3d/direct/showbase/PythonUtil.py", line 58, in <module>
    import direct.extensions_native.extension_native_helpers
  File "/usr/share/panda3d/direct/extensions_native/extension_native_helpers.py", line 75, in <module>
  File "/usr/share/panda3d/direct/extensions_native/extension_native_helpers.py", line 69, in Dtool_PreloadDLL
    raise ImportError, message
ImportError: DLL loader cannot find libpandaexpress.

and also many other applications in my system don’t work at all after this changing.

I use Ubuntu 9.04 64 bit…

Actually I tried also to compile panda for python2.5 (set 2.5 as a default version). It was not finished successfully, but I saw built libraries in Built folder, so I used them in Houdini’s python… But in this case I had “Segmentation fault” when I was creating EggData object…:slight_smile:

Tried to compile again for Python2.5.4, compiled successfully. When I import compiled libraries it shows me an error message:

>> from pandac.PandaModules import EggData
>> Segmentation fault

If I try it in Houdini - it crashes…
It seems if I can’t find the solution, I will have to create intermediate file in my own format and then use another python application to parse this file and to create actual .egg file… I would like to avoid such thing.:slight_smile:
Or another way is to examine an .egg file syntax and write without EggData class, but this way is not suggested by developers of the engine… The only thing I need - is to get working panda libraries for python 2.5… May be I compile them somehow in inappropriate way… Was anyone trying to make panda using python 2.5? Share the results…:slight_smile:

Changing the system’s default version of Python won’t help - Panda is and stays compiled against Python 2.6.

Here’s what you can do. Uninstall panda3d, head over to the download page, and try installing the “Intrepid Ibex” build (even though you use a newer version). I think the intrepid build is compiled against Python 2.5 and it just might work on Hardy.

Ok, thanks - I will try and post the results!

Thank you! Now it is working!

What I did:

  1. Removed Panda3d for python2.6
  2. Installed Panda3d for python2.5 (panda3d_1.6.2-ubuntuintrepid_amd64.deb)
  3. Setup Komodo to use python2.5, instead of default one

If you install python2.5 on you system, Houdini automatically uses it instead his own copy. Houdini contains python2.5.2 version, which is STILL incompatible with these panda3d libraries…:slight_smile: But if you install python2.5.4 Houdini uses it and can import panda3d libraries and create objects (at least EggData). I hope it will not break anything in Houdini functionality, I mean usage of different version of python. I will test it later anyway…

And in my program I had to remove all “format” functions for strings, which, I suppose, are not supported in python2.5

Thanks again!!!