I’ve been trying to get Panda installed since I upgraded from Kubuntu 6.04 (Dapper Drake) to 6.10 (Edgy Eft). Kubuntu Edgy uses KDE, which now depends on digikam, which depends on a utility called dcparse, which in turn causes a conflict trying to install the latest Panda3D Ubuntu deb package.
I thought I’d try an alternative install location in my personal directory, in which I’ve simply unpacked the deb package. To run Panda utilities and programs written using the Panda engine I’ve written a short shell script that adds the local bin and lib paths and the python path:
#!/usr/bin/sh PATH=/home/matt/software/Panda3D-1.3.2/usr/bin:$PATH export PATH LD_LIBRARY_PATH=/home/matt/software/Panda3D-1.3.2/usr/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH PYTHONPATH=/home/matt/software/Panda3D-1.3.2/usr/share/panda3d:$PYTHONPATH export PYTHONPATH <command to run goes here>
When I try to run this script with a command like
I get this error:
DirectStart: Starting the game. Traceback (most recent call last): File "/home/matt/software/Panda3D-1.3.2/usr/share/panda3d/samples/GreetingCard/GreetingCard.py", line 1, in ? import direct.directbase.DirectStart File "debtmp/usr/share/panda3d/direct/src/directbase/DirectStart.py", line 3, in ? File "debtmp/usr/share/panda3d/direct/src/showbase/ShowBase.py", line 10, in ? File "/home/matt/software/Panda3D-1.3.2/usr/share/panda3d/pandac/PandaModules.py", line 1, in ? from libpandaexpressModules import * File "/home/matt/software/Panda3D-1.3.2/usr/share/panda3d/pandac/libpandaexpressModules.py", line 1, in ? from extension_native_helpers import * File "/home/matt/software/Panda3D-1.3.2/usr/share/panda3d/pandac/extension_native_helpers.py", line 20, in ? from libpandaexpress import * ImportError: No module named libpandaexpress
I’m not sure about how python goes about locating it’s files, but it seems to be handling imports that actually invoke *.py files correctly, only failing with libpandaexpress which does not seem to have a *.py file, but only a *.so shared library.
So my question for any Python experts out there is if I’m missing any critical steps in getting Python/Panda3D in recognizing where all of the critical components are located? I’ve noticed that the LD_LIBRARY_PATH setting does not seem to be having any effect (same error message with or without). I’ve tried fiddling with the panda3d.pth file and copying the config files into the true etc/ directory, but with no effect.
UPDATE: I solved the problem by
- building my own panda from sources using makepanda
- updating PATH and LD_LIBRARY_PATH to the built/bin and built/lib directories
- changing my script to switch to the directory of the *.py file to run
- using ppython instead of python
I’m not sure but I think that the pre-packaged Ubuntu deb may not have worked because of some version conflict in the Python libraries, because steps 2-4 alone were not sufficient to get this version running.