Panda not running !! Help !!!

.I installed panda by running the debian file for my ubuntu os version 7.04.I have python 2.4 and 2.5 on my ubuntu feisty fawn system.When i run a file i get

DirectStart: Starting the game.
Traceback (most recent call last):
File “panda1.py”, line 2, in ?
import direct.directbase.DirectStart
File “/usr/share/panda3d/direct/src/directbase/DirectStart.py”, line 3, in ?
from direct.showbase import ShowBase
File “/usr/share/panda3d/direct/src/showbase/ShowBase.py”, line 10, in ?
from pandac.PandaModules import *
File “/usr/share/panda3d/pandac/PandaModules.py”, line 1, in ?
from libpandaexpressModules import *
File “/usr/share/panda3d/pandac/libpandaexpressModules.py”, line 1, in ?
from extension_native_helpers import *
File “/usr/share/panda3d/pandac/extension_native_helpers.py”, line 20, in ?
from libpandaexpress import *
ImportError: No module named libpandaexpress

Please help me…

Having two versions of python installed is a potential problem. Panda can only be compiled for one version of python. I don’t remember off the top of my head which version of python the feisty version of panda is compiled for, but it’s whatever comes with feisty out of the box. Make sure you’re using that version of python, and try it again.

Feisty comes with python 2.5. I tried running it with both the python versions. Python 2.4 and 2.5 both give me:

DirectStart: Starting the game.
Traceback (most recent call last):
File “/usr/share/panda3d/panda1.py”, line 2, in ?
import direct.directbase.DirectStart
File “/usr/share/panda3d/direct/src/directbase/DirectStart.py”, line 3, in ?
from direct.showbase import ShowBase
File “/usr/share/panda3d/direct/src/showbase/ShowBase.py”, line 10, in ?
from pandac.PandaModules import *
File “/usr/share/panda3d/pandac/PandaModules.py”, line 1, in ?
from libpandaexpressModules import *
File “/usr/share/panda3d/pandac/libpandaexpressModules.py”, line 1, in ?
from extension_native_helpers import *
File “/usr/share/panda3d/pandac/extension_native_helpers.py”, line 20, in ?
from libpandaexpress import *
ImportError: No module named libpandaexpress

This is after changing the python path. Before this i used to get the error that the module direct.directbase.DirectStart not found.

Make LD_LIBRARY_PATH and PYTHONPATH point to the .so libraries, the place where you put them.

After reading one of the threads in this forum i did:

[b]abhijeet@abhijeet-desktop:~$ locate libpandaexpress
/usr/lib/python2.5/lib-dynload/libpandaexpress.so
/usr/lib/libpandaexpress.so
/usr/share/panda3d/pandac/libpandaexpressModules.py

abhijeet@abhijeet-desktop:~$ LD_LIBRARY_PATH=/usr/lib/

abhijeet@abhijeet-desktop:~$ echo $LD_LIBRARY_PATH
/usr/lib/

abhijeet@abhijeet-desktop:~$ export LD_LIBRARY_PATH

abhijeet@abhijeet-desktop:~$ python /usr/share/panda3d/panda1.py
DirectStart: Starting the game.
Traceback (most recent call last):
File “/usr/share/panda3d/panda1.py”, line 2, in
import direct.directbase.DirectStart
File “linuxroot/usr/share/panda3d/direct/src/directbase/DirectStart.py”, line 3, in
File “linuxroot/usr/share/panda3d/direct/src/showbase/ShowBase.py”, line 10, in
File “/usr/share/panda3d/pandac/PandaModules.py”, line 1, in
from libpandaexpressModules import *
File “/usr/share/panda3d/pandac/libpandaexpressModules.py”, line 1, in
from extension_native_helpers import *
File “/usr/share/panda3d/pandac/extension_native_helpers.py”, line 20, in
from libpandaexpress import *
ImportError: No module named libpandaexpress[/b]

It still gives me the same error :frowning:

As I said, make PYTHONPATH point to that location as well.

Thanks for the reply.

I did what you asked me to do. ie i pointed pythonpath to the same location as well…

abhijeet@abhijeet-desktop:~$ echo $PYTHONPATH $LD_LIBRARY_PATH
/usr/lib /usr/lib/

abhijeet@abhijeet-desktop:~ PYTHONPATH=/usr/lib abhijeet@abhijeet-desktop:~ export PYTHONPATH
abhijeet@abhijeet-desktop:~$ echo $PYTHONPATH $LD_LIBRARY_PATH
/usr/lib /usr/lib/

abhijeet@abhijeet-desktop:~$ python /usr/share/panda3d/panda1.py
DirectStart: Starting the game.
Traceback (most recent call last):
File “/usr/share/panda3d/panda1.py”, line 2, in
import direct.directbase.DirectStart
File “linuxroot/usr/share/panda3d/direct/src/directbase/DirectStart.py”, line 3, in
File “linuxroot/usr/share/panda3d/direct/src/showbase/ShowBase.py”, line 10, in
File “/usr/share/panda3d/pandac/PandaModules.py”, line 1, in
from libpandaexpressModules import *
File “/usr/share/panda3d/pandac/libpandaexpressModules.py”, line 1, in
from extension_native_helpers import *
File “/usr/share/panda3d/pandac/extension_native_helpers.py”, line 20, in
from libpandaexpress import *
ImportError: /usr/lib/libpandaexpress.so: undefined symbol: PyUnicodeUCS4_FromWideChar

The error has definitely changed but i dont know what to make of this as welll…Any ideas??

Regards,
Abhijeet

No, wait. Don’t set any environment variables. Panda is supposed to work out of the box. No fooling with environment variables is necessary. You should already have these two files:

/etc/ld.so.conf.d/panda3d.conf
/usr/lib/python2.5/lib-dynload/panda.pth

Both of these are included in the DEB file. One of them effectively configures your linker path, the other one configures your python path. This is why environment variables are not necessary.

If one of those files is missing, then the DEB file didn’t install properly. If they are present, then python should be able to find its libraries. If not, then something’s seriously broken, and tweaking environment variables isn’t going to fix it.

My hunch is that somehow, it’s using part of python 2.4, and that’s the cause of the problem.

Try this: type “python” at the command line, then type “import direct.directbase.DirectStart” right at the prompt, and see what it does.

@Josh:

/etc/ld.so.conf.d/panda3d.conf contains /usr/lib/panda3d
/usr/lib/python2.5/lib-dynload/panda.pth contains /usr/share/panda3d

Now the thing is that i do not have a folder called panda3d in my /usr/lib folder.So i changed the panda3d.conf file and made it /usr/lib because that is where my library files are. Alas, i still get the same “libpandaexpress not found” error.

As for the second thing:

when i type python

abhijeet@abhijeet-desktop:~$ python
Python 2.5.1 (r251:54863, Jul 3 2007, 22:07:15)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import direct.directbase.DirectStart
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named direct.directbase.DirectStart

Now i try python2.4

abhijeet@abhijeet-desktop:~$ python2.4
Python 2.4.4 (#2, Apr 12 2007, 21:03:11)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import direct.directbase.DirectStart
Traceback (most recent call last):
File “”, line 1, in ?
ImportError: No module named direct.directbase.DirectStart

Any new ideas??

Regards,
Abhijeet

Thank you all for the replies.

My error was that I had 2 versions of python 2.5 on my comp.One was in /usr/local/bin and the other in /usr/bin/ . Thus Panda had been compiled for 1 version of python and i had been accessing the wrong python all along !!

Thank you for the support guys !!

Regards,
Abhijeet