Stuck trying alternative install location (SOLVED)

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

python /home/matt/software/Panda3D-1.3.2/usr/share/panda3d/samples/GreetingCard/GreetingCard.py

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

  1. building my own panda from sources using makepanda
  2. updating PATH and LD_LIBRARY_PATH to the built/bin and built/lib directories
  3. changing my script to switch to the directory of the *.py file to run
  4. 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.

Another possibility would be to strip the “dcparse” executable out of the panda DEB file. I don’t know how hard that is. But panda doesn’t need that executable.

Still, it would be nice to have a version that nicely plays with the Edgy package environment for system hygiene purposes.

So I have investigated a little deeper into the issue and found out the following conflicts:

  • conflicting package: dcraw
    – conflicting file: /usr/bin/dcparse
  • conflicting package: libavcodec-dev
    – conflicting file: /usr/lib/libavcodec.a
    – conflicting file: /usr/lib/libavutil.a
  • conflicting package: libavformat-dev
    – conflicting file: /usr/lib/libavformat.a

Would be nice if there were deb-srces around to rebuild the package according to the changed dependencies.

Guy

Can the problem with dcraw be fixed? I tried to install digiKam and it’s been a PITA. Not only did it fail, but it rather messed up dpkg. Don’t ask about the details. I still can’t install digiKam.

Bump.

This is still a pain, is causing problems with upgrades to Feisty Fawn, and should be a quick fix. Unless I’m misunderstanding the extent of the problem, appending p3d- to a few files and changing all references to the new name should do it.

Check out this thread.

Yeah, those were the Feisty problems I was referring to.

It is possible to work around it, which I have done, but it still prevents the installation of KDE applications and is irritating. Renaming the problem packages and a few files would solve these problems.