[FIXED] Panda3d only for sudo (Ubuntu repo install)

Hi,

I installed the python3d1.7 package by adding the following to my sources (thanks rdb):

deb http://archive.panda3d.org/ubuntu maverick main

When I installed I got the following error, but it didn’t seem to impact on anything.

However, when I try to run a sample application it fails with:

ImportError: No module named direct.directbase.DirectStart

I already had a panda3d.pth in /usr/lib/python2.6/dist-packages.

I had already discovered that I couldn’t just run panda3d, I had to run sudo panda3d. I then discovered that if I ran python as sudo, I could import the panda3d module.

The following files/folders were owned by user 1000, with no permissions for users. I changed them to be owned by root, with other users allowed read access, matching the permissions of sibling files or folders.

/usr/lib/panda3d
/usr/bin/panda3d
/usr/lib/python2.6/dist-packages/panda3d.pth
/etc/Confauto.prc
/etc/Config.prc

I can now run the sample apps!

What’s interesting is that I installed (via Synaptic) using user 1003. This looks to me like a bug in the installation process?

(edited to add files in /etc which were also causing errors)

Edit: fixed title to match current state of the issue (workaround rather than solved in deb)

Edit: fixed title to match current state of the issue (fixed in deb)

Guess i need to try this. I will let you know what happens

sudo python did fix it! I just got some head injuries so i need to remember how to change ownerships. Back to google lol

Personally, I avoid the command line, so I’ve installed the package nautilus-gksu. (Install it, then log out and log back in.) This adds “Open folder as administrator” to the right-click menu in Nautilus.

You can open a folder as administrator, then right-click on a file to modify permissions through Nautilus.

Otherwise, there’s chmod and chown from the command line:

ss64.com/bash/chmod.html

ss64.com/bash/chown.html

Hope that helps :slight_smile:

I highly advise against running Python as root. It’s a bug in Panda3D I’ll look at soon.

Thank you very much sir

I updated the debs. Does the issue still occur?

Yes (on my PC).

What is the problem now? Wrong ownership? Wrong permissions?

Wrong permissions. In order to get it working I had modified the permissions for the files cited in the OP and for the libs contained in /usr/lib64/panda3d/lib.

What are the permissions? Can you do an “ls -hAlF” or so?

flavio@flavio-desktop:/usr/share/panda3d/samples/Asteroids$ ls -hAlF /usr/bin/panda3d /usr/lib/python2.6/dist-packages/panda3d.pth /etc/Confauto.prc /etc/Config.prc /usr/lib64/panda3d
-rw------- 1 root   root   5,0K 2011-04-30 20:21 /etc/Confauto.prc
-rw-r--r-- 1 root   root   3,2K 2011-03-09 13:20 /etc/Config.prc
-rwx------ 1 flavio flavio 1,1M 2011-03-15 15:46 /usr/bin/panda3d*
-rw------- 1 root   root     38 2011-04-30 20:21 /usr/lib/python2.6/dist-packages/panda3d.pth

/usr/lib64/panda3d:
totale 62M
lrwxrwxrwx 1 root   root     18 2011-05-02 11:05 libp3direct.so -> libp3direct.so.1.7*
-rwx------ 1 root   root   1,8M 2011-04-30 20:21 libp3direct.so.1.7*
lrwxrwxrwx 1 root   root     23 2011-05-02 11:05 libp3dtoolconfig.so -> libp3dtoolconfig.so.1.7*
-rwx------ 1 root   root   453K 2011-04-30 20:21 libp3dtoolconfig.so.1.7*
lrwxrwxrwx 1 root   root     17 2011-05-02 11:05 libp3dtool.so -> libp3dtool.so.1.7*
-rwx------ 1 root   root   246K 2011-04-30 20:21 libp3dtool.so.1.7*
-rwx------ 1 root   root   105K 2011-04-30 20:21 libp3fmod_audio.so*
lrwxrwxrwx 1 root   root     21 2011-05-02 11:05 libp3framework.so -> libp3framework.so.1.7*
-rwx------ 1 root   root   433K 2011-04-30 20:21 libp3framework.so.1.7*
lrwxrwxrwx 1 root   root     19 2011-05-02 11:05 libp3glstuff.so -> libp3glstuff.so.1.7*
-rwx------ 1 root   root   8,1K 2011-04-30 20:21 libp3glstuff.so.1.7*
lrwxrwxrwx 1 root   root     17 2011-05-02 11:05 libp3heapq.so -> libp3heapq.so.1.7*
-rwx------ 1 root   root    14K 2011-04-30 20:21 libp3heapq.so.1.7*
-rwx------ 1 root   root   144K 2011-04-30 20:21 libp3openal_audio.so*
-rwx------ 1 root   root   6,0M 2011-04-30 20:21 libp3ptloader.so*
lrwxrwxrwx 1 root   root     18 2011-05-02 11:05 libp3pystub.so -> libp3pystub.so.1.7*
-rwx------ 1 root   root    30K 2011-04-30 20:21 libp3pystub.so.1.7*
lrwxrwxrwx 1 root   root     18 2011-05-02 11:05 libp3vision.so -> libp3vision.so.1.7*
-rwx------ 1 root   root   286K 2011-04-30 20:21 libp3vision.so.1.7*
lrwxrwxrwx 1 root   root     17 2011-05-02 11:05 libpandaai.so -> libpandaai.so.1.7*
-rwx------ 1 root   root   314K 2011-04-30 20:21 libpandaai.so.1.7*
lrwxrwxrwx 1 root   root     18 2011-05-02 11:05 libpandaegg.so -> libpandaegg.so.1.7*
-rwx------ 1 root   root   3,2M 2011-04-30 20:21 libpandaegg.so.1.7*
lrwxrwxrwx 1 root   root     22 2011-05-02 11:05 libpandaexpress.so -> libpandaexpress.so.1.7*
-rwx------ 1 root   root   4,0M 2011-04-30 20:21 libpandaexpress.so.1.7*
lrwxrwxrwx 1 root   root     17 2011-05-02 11:05 libpandafx.so -> libpandafx.so.1.7*
-rwx------ 1 root   root   333K 2011-04-30 20:21 libpandafx.so.1.7*
-rwx------ 1 root   root   781K 2011-04-30 20:21 libpandagl.so*
-rwx------ 1 root   root   614K 2011-04-30 20:21 libpandamesa.so*
lrwxrwxrwx 1 root   root     18 2011-05-02 11:05 libpandaode.so -> libpandaode.so.1.7*
-rwx------ 1 root   root   4,1M 2011-04-30 20:21 libpandaode.so.1.7*
lrwxrwxrwx 1 root   root     22 2011-05-02 11:05 libpandaphysics.so -> libpandaphysics.so.1.7*
-rwx------ 1 root   root   2,0M 2011-04-30 20:21 libpandaphysics.so.1.7*
lrwxrwxrwx 1 root   root     19 2011-05-02 11:05 libpandaskel.so -> libpandaskel.so.1.7*
-rwx------ 1 root   root    47K 2011-04-30 20:21 libpandaskel.so.1.7*
lrwxrwxrwx 1 root   root     15 2011-05-02 11:05 libpanda.so -> libpanda.so.1.7*
-rwx------ 1 root   root    30M 2011-04-30 20:21 libpanda.so.1.7*
lrwxrwxrwx 1 root   root     21 2011-05-02 11:05 libtinydisplay.so -> libtinydisplay.so.1.7*
-rwx------ 1 root   root   8,2M 2011-04-30 20:21 libtinydisplay.so.1.7*
-rw------- 1 root   root   8,4K 2011-04-30 20:21 panda3d.py
-rw------- 1 flavio flavio 7,2K 2011-02-02 19:08 panda3d.pyc

All right, thanks. I think the problem was due to a faulty umask (buildbot had set it to 077). Try the updated debs.

It doesn’t work. I’ve updated with:

sudo apt-get remove panda3d
sudo apt-get install panda3d

And I obtain:

$ ls -hAlF /usr/bin/panda3d /usr/lib/python2.6/dist-packages/panda3d.pth /etc/Confauto.prc /etc/Config.prc /usr/lib64/panda3d 
-rw------- 1 root   root   5,0K 2011-04-30 20:21 /etc/Confauto.prc
-rw-r--r-- 1 root   root   3,2K 2011-03-09 13:20 /etc/Config.prc
-rwxr--r-- 1 flavio flavio 1,1M 2011-03-15 15:46 /usr/bin/panda3d*
-rw------- 1 root   root     38 2011-04-30 20:21 /usr/lib/python2.6/dist-packages/panda3d.pth

/usr/lib64/panda3d:
totale 62M
lrwxrwxrwx 1 root   root     18 2011-05-02 15:05 libp3direct.so -> libp3direct.so.1.7*
-rwx------ 1 root   root   1,8M 2011-04-30 20:21 libp3direct.so.1.7*
lrwxrwxrwx 1 root   root     23 2011-05-02 15:05 libp3dtoolconfig.so -> libp3dtoolconfig.so.1.7*
-rwx------ 1 root   root   453K 2011-04-30 20:21 libp3dtoolconfig.so.1.7*
lrwxrwxrwx 1 root   root     17 2011-05-02 15:05 libp3dtool.so -> libp3dtool.so.1.7*
-rwx------ 1 root   root   246K 2011-04-30 20:21 libp3dtool.so.1.7*
-rwx------ 1 root   root   105K 2011-04-30 20:21 libp3fmod_audio.so*
lrwxrwxrwx 1 root   root     21 2011-05-02 15:05 libp3framework.so -> libp3framework.so.1.7*
-rwx------ 1 root   root   433K 2011-04-30 20:21 libp3framework.so.1.7*
lrwxrwxrwx 1 root   root     19 2011-05-02 15:05 libp3glstuff.so -> libp3glstuff.so.1.7*
-rwx------ 1 root   root   8,1K 2011-04-30 20:21 libp3glstuff.so.1.7*
lrwxrwxrwx 1 root   root     17 2011-05-02 15:05 libp3heapq.so -> libp3heapq.so.1.7*
-rwx------ 1 root   root    14K 2011-04-30 20:21 libp3heapq.so.1.7*
-rwx------ 1 root   root   144K 2011-04-30 20:21 libp3openal_audio.so*
-rwx------ 1 root   root   6,0M 2011-04-30 20:21 libp3ptloader.so*
lrwxrwxrwx 1 root   root     18 2011-05-02 15:05 libp3pystub.so -> libp3pystub.so.1.7*
-rwx------ 1 root   root    30K 2011-04-30 20:21 libp3pystub.so.1.7*
lrwxrwxrwx 1 root   root     18 2011-05-02 15:05 libp3vision.so -> libp3vision.so.1.7*
-rwx------ 1 root   root   286K 2011-04-30 20:21 libp3vision.so.1.7*
lrwxrwxrwx 1 root   root     17 2011-05-02 15:05 libpandaai.so -> libpandaai.so.1.7*
-rwx------ 1 root   root   314K 2011-04-30 20:21 libpandaai.so.1.7*
lrwxrwxrwx 1 root   root     18 2011-05-02 15:05 libpandaegg.so -> libpandaegg.so.1.7*
-rwx------ 1 root   root   3,2M 2011-04-30 20:21 libpandaegg.so.1.7*
lrwxrwxrwx 1 root   root     22 2011-05-02 15:05 libpandaexpress.so -> libpandaexpress.so.1.7*
-rwx------ 1 root   root   4,0M 2011-04-30 20:21 libpandaexpress.so.1.7*
lrwxrwxrwx 1 root   root     17 2011-05-02 15:05 libpandafx.so -> libpandafx.so.1.7*
-rwx------ 1 root   root   333K 2011-04-30 20:21 libpandafx.so.1.7*
-rwx------ 1 root   root   781K 2011-04-30 20:21 libpandagl.so*
-rwx------ 1 root   root   614K 2011-04-30 20:21 libpandamesa.so*
lrwxrwxrwx 1 root   root     18 2011-05-02 15:05 libpandaode.so -> libpandaode.so.1.7*
-rwx------ 1 root   root   4,1M 2011-04-30 20:21 libpandaode.so.1.7*
lrwxrwxrwx 1 root   root     22 2011-05-02 15:05 libpandaphysics.so -> libpandaphysics.so.1.7*
-rwx------ 1 root   root   2,0M 2011-04-30 20:21 libpandaphysics.so.1.7*
lrwxrwxrwx 1 root   root     19 2011-05-02 15:05 libpandaskel.so -> libpandaskel.so.1.7*
-rwx------ 1 root   root    47K 2011-04-30 20:21 libpandaskel.so.1.7*
lrwxrwxrwx 1 root   root     15 2011-05-02 15:05 libpanda.so -> libpanda.so.1.7*
-rwx------ 1 root   root    30M 2011-04-30 20:21 libpanda.so.1.7*
lrwxrwxrwx 1 root   root     21 2011-05-02 15:05 libtinydisplay.so -> libtinydisplay.so.1.7*
-rwx------ 1 root   root   8,2M 2011-04-30 20:21 libtinydisplay.so.1.7*
-rw------- 1 root   root   8,4K 2011-04-30 20:21 panda3d.py
-rw-r--r-- 1 flavio flavio 7,2K 2011-02-02 19:08 panda3d.pyc

The right way to upgrade:

sudo apt-get update
sudo apt-get install panda3d1.7

Make sure you’re using revision 3 of the package.

It works now. Thank you!

Works for me too, thanks!

I’m on 11.04, and I just installed via the deb source location you listed above, and I’m getting the exact permissions error you mentioned.

I’ll probably just manually set the permissions as well.

thanks,

I just updated Ubuntu from version 10.10 to version 11.04 and now I’m getting the same kind of error, despite the fact files permissions are set the right way. Now can’t run any Panda3d project. Any thought?

Use python2.6 instead of python.