New user, new install, and python exceptions

About me:
I’ve got lots of C development, a good amount of Python, and command line wizardry.

My machine: Dell c610 (Pentium M, 512mb) running Mepis. Installed the Dapper .deb file directly with dpkg, installation went without a hitch.

HOWEVER, I’m going through the “Start Guide For The Absolute Beginner” portion of the manual ('cause I’m a 3d absolute beginner). I’m doing this:

joe@0[3d]$ cat
import direct.directbase.DirectStart


joe@0[3d]$ python
DirectStart: Starting the game.
Traceback (most recent call last):
File “”, line 1, in ?
import direct.directbase.DirectStart
File “linuxroot/usr/share/panda3d/direct/src/directbase/”, line 3, in ?
File “linuxroot/usr/share/panda3d/direct/src/showbase/”, line 10, in ?
File “/usr/share/panda3d/pandac/”, line 1, in ?
from libpandaexpressModules import *
File “/usr/share/panda3d/pandac/”, line 1, in ?
from extension_native_helpers import *
File “/usr/share/panda3d/pandac/”, line 20, in ?
from libpandaexpress import *
ImportError: cannot open shared object file: No such file or directory

joe@0[3d]$ locate

joe@0[3d] stat `locate` File: `/usr/lib/panda3d/' Size: 431890 Blocks: 856 IO Block: 4096 regular file Device: 301h/769d Inode: 392349 Links: 1 Access: (0755/-rwxr-xr-x) Uid: ( 1000/ joe) Gid: ( 1000/ UNKNOWN) Access: 2007-10-24 22:00:42.000000000 -0400 Modify: 2007-10-02 21:35:03.000000000 -0400 Change: 2007-10-24 22:01:10.000000000 -0400 joe@0[3d]

So, I’ve got permissions, it’s there… why the exception?
Do I need to mess around with my PYTHONPATH or something?

Could this be… because the direct class is related to directX?

Is there an absolute beginner page for people who banned MS from their houses five years ago?

Did more homework…
Python 2.4.3 is installed, which as far as I can tell is the version Dapper is expecting.
trying to import direct.directbase.DirectStart in interactive mode gives the same exception.
Apparently other people have problems with modules not showing up, but I posted initially because nobody listed this one ( as one that was a problem, so sorry if I’m covering the same ground…
I don’t have another version of Python installed.

Thanks in advance!

“direct” is not related to DirectX.

The problem seems to be that the library is in /usr/lib/panda3d, but that directory doesn’t seem to be in the linker path. I wonder why?

First question: is there anything panda3d-related in /etc/

Second question: does running ldconfig solve anything?

root@0[3d]# cat /etc/

Yep, there was another file in a previous post:

I don’t have python 2.5, and there’s no python2.4/lib-dynload/panda.pth.
Does that make a difference?

It seems like previous solutions like running ppython are also dead ends (since this script says it’s deprecated).

Running ldconfig didn’t help (and it ran as part of dpkg anyway).

I appreciate the help - hopefully I’m not acting like a total noob.

If you are running it with python2.4, I think you can just copy the panda.pth from the python25 directory in the python24 directory instead.

Yep, tried that too.
I was really hoping to move to Gobolinux next, but I suppose I’ll have to wipe Mepis and try to find a version of Kubuntu which will actually install on my intentionally-genericized-by-Dell hardware…
…'cause it seems like I may be in uncharted territory using Mepis?

OK, so it looks like the dependencies are broken. I guess I compiled for python 2.5, and it looks like dapper uses python 2.4. I don’t know how that happened, except that maybe I did an apt-get update at some point and maybe it upgraded me to python 2.5?

export PYTHONPATH=/usr/lib/panda3d
export LD_LIBRARY_PATH=/usr/lib/panda3d

This “fixed” the problem, it now runs.
I know it’s not supposed to be the solution, but it’s a moot point now, since this hardware won’t run most of the tutorials properly.

Anyone built the source on a Mac?

Just FYI, Mepis had a brief stint with using Ubuntu dapper repositories, but I just read they’re going back to using straight Debian repositories since dapper isn’t getting updated with new apps (hence the 2.4 python).

Thanks for your help! I’ll make this work out on another machine with better hardware (and an NVIDIA card), with Ubuntu, or maybe straight Debian.

I’m having a similar problem, when i try to compile a file in fedora5 , it shows this:

[danielpires@localhost share] cd panda3d/ [danielpires@localhost panda3d] ls
direct LICENSE models pandac Pmw ReleaseNotes samples
[danielpires@localhost panda3d] cd samples/ [danielpires@localhost samples] cd Sample-Programs–Asteroids/
[danielpires@localhost Sample-Programs–Asteroids] python DirectStart: Starting the game. Warning: DirectNotify: category 'Interval' already exists Known pipe types: glxGraphicsPipe (all display modules loaded.) :display(error): The application requested harware acceleration, but your OpenGL:display(error): driver, Mesa GLX Indirect, only supports software rendering. :display(error): You need to install a hardware-accelerated OpenGL driver, or, :display(error): if you actually *want* to use a software renderer, then :display(error): alter the hardware/software configuration in your Config.prc file. :display(error): Window wouldn't open; abandoning window. :05-06-2008 11:39:02 ShowBase(warning): Unable to open 'onscreen' window. Traceback (most recent call last): File "", line 13, in ? import direct.directbase.DirectStart File "linuxroot/usr/share/panda3d/direct/src/directbase/", line 4, in ? File "linuxroot/usr/share/panda3d/direct/src/showbase/", line 235, in __init__ File "linuxroot/usr/share/panda3d/direct/src/showbase/", line 664, in openDefaultWindow StandardError: Could not open window. Error in sys.exitfunc: Traceback (most recent call last): File "linuxroot/usr/share/panda3d/direct/src/showbase/", line 391, in exitfunc AttributeError: ShowBase instance has no attribute 'loader' [danielpires@localhost Sample-Programs--Asteroids]

i’ve tried to link panda in the path , but it didn’t work…
Anyone know what to do?

The answer is in the output:

This is happening because Fedora (as most distros) doesn’t necessarily come with a hardware-accelerated OpenGL driver pre-installed, so the only OpenGL support you get is software. You can use software, but it’s really, really slow compared to hardware, so we make you turn it on if you really want to use.

Your two solutions are:
(1) Install a hardware-accelerated OpenGL driver. To do this, go to or (or whatever kind of graphics card you have) and download the appropriate Linux driver. Follow their instructions for installation. Good luck.

(2) Enable software rendering. Edit your Config.prc file to remove the word “hardware” and replace it with “software”. Panda will run slowly, but it will work.


Now that i`ve installed the nvidia driver and put the paths it shows this:

[root@localhost Asteroids]# python
DirectStart: Starting the game.
Traceback (most recent call last):
File “”, line 13, in
import direct.directbase.DirectStart
File “linuxroot/usr/share/panda3d/direct/src/directbase/”, line 3, in
File “linuxroot/usr/share/panda3d/direct/src/showbase/”, line 10, in
File “/usr/share/panda3d/pandac/”, line 2, in
from libpandaModules import *
File “/usr/share/panda3d/pandac/”, line 3, in
from libpanda import *
ImportError: /usr/lib/panda3d/ cannot restore segment prot after reloc: Permission denied

anyone knows what to do?

thanks agains for the help