Panda3D 1.3.2 on Ubuntu 7.04 (solved)

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.

Anyone else using Ubuntu? Any ideas?

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”.

David

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?

PM Josh Yelon.

I’m expecting a deb verion for ubuntu 7.04 too. Ubuntu 7.04 is a very good OS.

I dont get it work, will there be one for Ubuntu 7.04 soon? I really want to try Panda.

Well, there should be a way to let remove that package as a dependency… in case you get that fixed, its at least worth copying it to panda3dprojects. :slight_smile:

Till its fixed in code, it is still a good idea to email Josh.

Regards, Bigfoot29

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.

Installed Archives:

...
usr/lib/python2.4/
usr/lib/python2.4/lib-dynload/
usr/lib/python2.4/site-packages/
usr/lib/python2.4/site-packages/panda3d.pth
...

[/code]

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):

libosmesa6 (6.5.2-3ubuntu7)
libosmesa6-dev (6.5.2-3ubuntu7)
flex (2.5.33-10build1)
libjpeg62-dev (6b-13)
libtiff4-dev (3.8.2-6)
libtiffxx0c2 (3.8.2-6)
libglpng (1.45-3ubuntu1)
libpng12-dev (1.2.15~beta5-1)
libfreetype6-dev (2.2.1-5ubuntu1)
libssl-dev (0.9.8c-4build1)
zlib1g-dev (1:1.2.3-13ubuntu4)
bison (1:2.3.dfsg-4build1)
m4 (1.4.8-1build1)

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:

s0094060@marley-20:/usr/lib/python2.4$ ls -p
aifc.py             DocXMLRPCServer.pyc  mailcap.pyc            reconvert.py            symtable.py
aifc.pyc            dumbdbm.py           markupbase.py          reconvert.pyc           symtable.pyc
anydbm.py           dumbdbm.pyc          markupbase.pyc         regex_syntax.py         tabnanny.py
anydbm.pyc          dummy_threading.py   mhlib.py               regex_syntax.pyc        tabnanny.pyc
asynchat.py         dummy_threading.pyc  mhlib.pyc              regsub.py               tarfile.py
asynchat.pyc        dummy_thread.py      mimetools.py           regsub.pyc              tarfile.pyc
asyncore.py         dummy_thread.pyc     mimetools.pyc          repr.py                 telnetlib.py
asyncore.pyc        email/               mimetypes.py           repr.pyc                telnetlib.pyc
atexit.py           encodings/           mimetypes.pyc          re.py                   tempfile.py
atexit.pyc          filecmp.py           MimeWriter.py          re.pyc                  tempfile.pyc
audiodev.py         filecmp.pyc          MimeWriter.pyc         rexec.py                test/
audiodev.pyc        fileinput.py         mimify.py              rexec.pyc               textwrap.py
base64.py           fileinput.pyc        mimify.pyc             rfc822.py               textwrap.pyc
base64.pyc          fnmatch.py           modulefinder.py        rfc822.pyc              this.py
BaseHTTPServer.py   fnmatch.pyc          modulefinder.pyc       rlcompleter.py          this.pyc
BaseHTTPServer.pyc  formatter.py         _MozillaCookieJar.py   rlcompleter.pyc         _threading_local.py
Bastion.py          formatter.pyc        _MozillaCookieJar.pyc  robotparser.py          _threading_local.pyc
Bastion.pyc         fpformat.py          multifile.py           robotparser.pyc         threading.py
bdb.py              fpformat.pyc         multifile.pyc          sched.py                threading.pyc
bdb.pyc             ftplib.py            mutex.py               sched.pyc               timeit.py
binhex.py           ftplib.pyc           mutex.pyc              sets.py                 timeit.pyc
binhex.pyc          __future__.py        netrc.py               sets.pyc                toaiff.py
bisect.py           __future__.pyc       netrc.pyc              sgmllib.py              toaiff.pyc
bisect.pyc          getopt.py            new.py                 sgmllib.pyc             tokenize.py
bsddb/              getopt.pyc           new.pyc                shelve.py               tokenize.pyc
calendar.py         getpass.py           nntplib.py             shelve.pyc              token.py
calendar.pyc        getpass.pyc          nntplib.pyc            shlex.py                token.pyc
CGIHTTPServer.py    gettext.py           ntpath.py              shlex.pyc               traceback.py
CGIHTTPServer.pyc   gettext.pyc          ntpath.pyc             shutil.py               traceback.pyc
cgi.py              glob.py              nturl2path.py          shutil.pyc              trace.py
cgi.pyc             glob.pyc             nturl2path.pyc         SimpleHTTPServer.py     trace.pyc
cgitb.py            gopherlib.py         opcode.py              SimpleHTTPServer.pyc    tty.py
cgitb.pyc           gopherlib.pyc        opcode.pyc             SimpleXMLRPCServer.py   tty.pyc
chunk.py            gzip.py              optparse.py            SimpleXMLRPCServer.pyc  types.py
chunk.pyc           gzip.pyc             optparse.pyc           site-packages/          types.pyc
cmd.py              heapq.py             os2emxpath.py          site.py                 tzparse.py
cmd.pyc             heapq.pyc            os2emxpath.pyc         site.pyc                tzparse.pyc
codecs.py           hmac.py              os.py                  smtpd.py                unittest.py
codecs.pyc          hmac.pyc             os.pyc                 smtpd.pyc               unittest.pyc
codeop.py           hotshot/             pdb.doc                smtplib.py              urllib2.py
codeop.pyc          htmlentitydefs.py    pdb.py                 smtplib.pyc             urllib2.pyc
code.py             htmlentitydefs.pyc   pdb.pyc                sndhdr.py               urllib.py
code.pyc            htmllib.py           __phello__.foo.py      sndhdr.pyc              urllib.pyc
colorsys.py         htmllib.pyc          __phello__.foo.pyc     socket.py               urlparse.py
colorsys.pyc        HTMLParser.py        pickle.py              socket.pyc              urlparse.pyc
commands.py         HTMLParser.pyc       pickle.pyc             SocketServer.py         UserDict.py
commands.pyc        httplib.py           pickletools.py         SocketServer.pyc        UserDict.pyc
compileall.py       httplib.pyc          pickletools.pyc        sre_compile.py          UserList.py
compileall.pyc      idlelib/             pipes.py               sre_compile.pyc         UserList.pyc
compiler/           ihooks.py            pipes.pyc              sre_constants.py        user.py
config/             ihooks.pyc           pkgutil.py             sre_constants.pyc       user.pyc
ConfigParser.py     imaplib.py           pkgutil.pyc            sre_parse.py            UserString.py
ConfigParser.pyc    imaplib.pyc          platform.py            sre_parse.pyc           UserString.pyc
cookielib.py        imghdr.py            platform.pyc           sre.py                  uu.py
cookielib.pyc       imghdr.pyc           plat-linux2/           sre.pyc                 uu.pyc
Cookie.py           imputil.py           popen2.py              statcache.py            warnings.py
Cookie.pyc          imputil.pyc          popen2.pyc             statcache.pyc           warnings.pyc
copy.py             inspect.py           poplib.py              stat.py                 wave.py
copy.pyc            inspect.pyc          poplib.pyc             stat.pyc                wave.pyc
copy_reg.py         keyword.py           posixfile.py           statvfs.py              weakref.py
copy_reg.pyc        keyword.pyc          posixfile.pyc          statvfs.pyc             weakref.pyc
csv.py              lib-dynload/         posixpath.py           StringIO.py             webbrowser.py
csv.pyc             lib-old/             posixpath.pyc          StringIO.pyc            webbrowser.pyc
curses/             lib-tk/              pprint.py              stringold.py            whichdb.py
dbhash.py           LICENSE.txt          pprint.pyc             stringold.pyc           whichdb.pyc
dbhash.pyc          linecache.py         pty.py                 stringprep.py           whrandom.py
decimal.py          linecache.pyc        pty.pyc                stringprep.pyc          whrandom.pyc
decimal.pyc         locale.py            pyclbr.py              string.py               xdrlib.py
difflib.py          locale.pyc           pyclbr.pyc             string.pyc              xdrlib.pyc
difflib.pyc         logging/             py_compile.py          _strptime.py            xml/
dircache.py         _LWPCookieJar.py     py_compile.pyc         _strptime.pyc           xmllib.py
dircache.pyc        _LWPCookieJar.pyc    pydoc.py               subprocess.py           xmllib.pyc
dis.py              macpath.py           pydoc.pyc              subprocess.pyc          xmlrpclib.py
dis.pyc             macpath.pyc          Queue.py               sunaudio.py             xmlrpclib.pyc
distutils/          macurl2path.py       Queue.pyc              sunaudio.pyc            zipfile.py
doc/                macurl2path.pyc      quopri.py              sunau.py                zipfile.pyc
doctest.py          mailbox.py           quopri.pyc             sunau.pyc
doctest.pyc         mailbox.pyc          random.py              symbol.py
DocXMLRPCServer.py  mailcap.py           random.pyc             symbol.pyc

Thx so much, chombee
Now, I’m at university, when I arrive in my home, I will look for that.

have you finish te .deb for ubuntu feasty fawn
and if yes can you pm me for take the link to download it
or post it here

Thank a lot

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.

ok i will test

heu why i must remove the deskto of ubuntu?

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.

This is the ubuntu-desktop package I’m talking about:

packages.ubuntu.com/dapper/base/ubuntu-desktop

nut i can re instale this parctage after instaling panda ?

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.