Ubuntu 7.04 (Feisty Fawn) was released yesterday and I upgraded to it from the previous release. After upgrade my Panda3D programs would not run:
Traceback (most recent call last):
File "pandaSteer.py", line 28, in <module>
import direct.directbase.DirectStart
ImportError: No module named direct.directbase.DirectStart
despite that I still had the Panda3D package installed. I removed the Panda3D package (uninstalled Panda3D), downloaded the panda3d_1.3.2-ubuntudapper_i386.deb version and tried to install it.
Installation failed with this error:
Unpacking panda3d (from .../panda3d_1.3.2-ubuntudapper_i386.deb) ...
dpkg: error processing /home/s0094060/Desktop/panda3d_1.3.2-ubuntudapper_i386.deb (--install):
trying to overwrite `/usr/bin/dcparse', which is also in package dcraw
dpkg-deb: subprocess paste killed by signal (Broken pipe)
So, I went and removed package dcraw (which is a program for decoding images from digital cameras, and is part of the standard ubuntu-desktop install) then tried to install the Panda .deb again. This time it worked fine, the Panda3D package is once again installed (although now I can’t reinstall dcraw or as a consequence ubuntu-desktop).
But when I try to run my Panda3D programs I still get the same error message as above, “No module named direct.directbase.DirectStart.”
This new version of Ubuntu upgrades Python from 2.4 to 2.5, in case that’s relevant.
Since Panda3D is still compiled with Python 2.4, you’ll have to be sure you’re running the Python that ships with Panda, and not the one that’s part of the operating system. You can either put Panda’s bin directory first on your path, or you can explicitly name the full path to Panda’s python, or you can try using “ppython”.
Not having much luck. Tried various ways of calling ppython directly but kept getting the same error, ran ppython by itself and noticed that it’s python 2.5:
s0094060@marley-20:~/sync/svn/PandaSteer2$ ppython pandaSteer.py
Traceback (most recent call last):
File "pandaSteer.py", line 28, in <module>
import direct.directbase.DirectStart
ImportError: No module named direct.directbase.DirectStart
s0094060@marley-20:~/sync/svn/PandaSteer2$ /usr/bin/ppython pandaSteer.py
Traceback (most recent call last):
File "pandaSteer.py", line 28, in <module>
import direct.directbase.DirectStart
ImportError: No module named direct.directbase.DirectStart
s0094060@marley-20:~/sync/svn/PandaSteer2$ /usr/share/panda3d/direct/src/showbase/ppython pandaSteer.py
Traceback (most recent call last):
File "pandaSteer.py", line 28, in <module>
import direct.directbase.DirectStart
ImportError: No module named direct.directbase.DirectStart
s0094060@marley-20:~/sync/svn/PandaSteer2$ ppython
Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
s0094060@marley-20:~/sync/svn/PandaSteer2$
s0094060@marley-20:~/sync/svn/PandaSteer2$ /usr/share/panda3d/direct/src/showbase/ppython
Python 2.5.1c1 (release25-maint, Apr 12 2007, 21:00:25)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Turns out I have python 2.4 (package name ‘python2.4’) installed as well as python 2.5 and panda’s ppython. Maybe it’s leftover from before I upgraded Ubuntu, maybe panda installed it for me, I dunno. But if I run ‘python2.4’ I get python 2.4:
s0094060@marley-20:~/sync/svn/PandaSteer2$ 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.
>>>
So I can run my Panda programs that way:
s0094060@marley-20:~/sync/svn/PandaSteer2$ python2.4 pandaSteer.py
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
Known pipe types:
glxGraphicsPipe
(all display modules loaded.)
:util(warning): Adjusting global clock's real time by 0.401677 seconds.
and it works!
Thanks for the hint. I’m also trying to build a Feisty .deb for panda, hopefully it will install without having to remove dcraw and ubuntu-desktop.
In the meantime, if you are on Ubuntu Feisty, you can use the 'panda3d_1.3.2-ubuntudapper_i386.deb ’ version of Panda from this site, just:
Open up Synaptic and uninstall dcraw and ubuntu-desktop and make sure you have python2.4 installed
Close Synaptic, double-click on the downloaded panda deb to install it
Use the command ‘python2.4’ instead of ‘python’ to run Panda3D programs
Finished building a panda .deb from source on feisty. I thought it might get rid of the clash with dcraw, but it didn’t, so scratch that. Also for some reason both the filename and the metadata of the deb said version 1.3.0 even though I built it from the source of 1.3.2.
The above solution for feisty isn’t pretty (especially having to remove ubuntu-desktop) but it does work.
Is it worth me forwarding the details from this thread to the email address of the package maintainer, or will that human see this thread anyway?
I did exacly like you, and the panda3d was installed OK, but running with ppython, python or python2.4, the modules isnt found. Have someting more did you?
Posting here the tests:
/usr/share/panda3d/samples/Feature-Tutorials--Lighting$ python2.4 Tut-Disco.py
Traceback (most recent call last):
File "Tut-Disco.py", line 9, in ?
import direct.directbase.DirectStart
ImportError: No module named direct.directbase.DirectStart
python2.4
Python 2.4.4 (#1, May 1 2007, 23:37:09)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Hmm… there’s nothing more that I did other than install the existing Panda deb and have python2.4 installed.
Here are some other packages I installed in order to get Panda to build from source (although I didn’t think any of these packages have an effect on running Panda programs, but just in case):
But I think those are just needed to build it. Python-wise I have python2.4, python2.4-dev and python2.4-minimal installed (as well as -doc and -examples).
Also, maybe this is useful for you to figure it out:
I finished the deb but deleted it, it was no better than the existing ubuntu dapper deb that you can download from this site. Just remove the packages dcraw and ubuntu-desktop before double-clicking the deb, and make sure you have python2.4 installed and use the python2.4 command instead of python.
It’s not ideal that you have to remove those packages (particularly ubuntu-desktop is an important meta-package) but the existing panda deb can be used perfectly well with ubuntu feisty.
On Ubuntu 7.04 the Panda3D package conflicts with the package called ubuntu-desktop. The Panda3D package will fail to install unless you remove the ubuntu-desktop package first.
The ubuntu-desktop package is not your desktop user interface, so you will not be removing your desktop. It is rather an empty package with dependencies that is just there to make sure that you have all the standard desktop components and get any new components that are added as upgrades. By removing this empty package you don’t remove any of the desktop packages you have, but you may miss out on any new desktop packages that get added.
No you can’t reinstall the package. Since the ubuntu-desktop and panda3d packages conflict, only one can be installed at a time. The panda3d package needs to be fixed, but until then you just have to remove ubuntu-desktop.
You could reinstall ubuntu-desktop if you first uninstalled panda3d.