Installing on Ubunutu 7.10

I downloaded the latest Ubuntu installer last night (2008.03.04) and installed with no problems. However, when running any of the demos, I can
ImportError: No module named direct.directbase.DirectStart

Any ideas? Setting the path?

when you type python do you get python 2.4 ?
if so you need to use python 2.5 with panda3d

there is also better ubuntu installers:
panda3d_1.4.2-ubuntudapper_i386.deb
panda3d_1.4.2-ubuntufeisty_i386.deb

No! He’s running ubuntu gutsy. He needs to download the ubuntu gutsy deb.

Running Python gives me my installation of Python 2.5.2. I’m wondering if there’s anything I need to add to my path. Is there a name of a Panda3D module I can try to import from an interpreter? That will easily show whether or not it’s installed correctly.

Try this in the python interpreter:

import sys;sys.path

It should be outputting a number of paths including pandas. If not, something is wrong.

C’mon guys, instead of advising him to do all this crazy stuff, why not just have him install the right version?

ok here is the link:
for gusty packedge:
www.panda3d.org/download/panda3d-200 … y_i386.deb

Is this a right version to download? Gutsy Installer If it is, then it installs correctly, or at least with no errors, but it’s not on my path (sys.path) Where is Panda3D installed to, and if I just use sys.path.append(installation location) will that work?

Edit: Treeform posted a minute before, and that appears to be the version I have downloaded. That’s the version I was referring to in the original post.

jpw27: ubuntu and debian are different from each other. Earlier, you said you were using ubuntu, not debian. So don’t download the debian package. Download the ubuntu package.

Use the link that treeform provided, above.

“panda3d_2008.03.04-ubuntugutsy_i386.deb”
panda3d ubutnu gusty 386 DEB
DEB being the debian packedge so we are left with python issues
have you tried both python24 and python25 and both did not get panda3d paths?

Okay, I was using debian to refer to it being a .deb package. Sorry for the confusion. I edited my other posts so it’s clearer.

Anyway, just to be complete, here’s the output of print sys.path in both 2.4 and 2.5

jason@jason-ubuntu:~$ python2.4
Python 2.4.4 (#2, Mar  7 2008, 04:45:43) 
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/local/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages/Numeric', '/usr/lib/python2.4/site-packages/gst-0.10', '/var/lib/python-support/python2.4', '/usr/lib/python2.4/site-packages/gtk-2.0', '/var/lib/python-support/python2.4/gtk-2.0']
>>> 
jason@jason-ubuntu:~$ python2.5
Python 2.5.2 (r252:60911, Mar  9 2008, 19:54:30) 
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/local/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg', '/usr/local/lib/python2.5/site-packages/PyOpenGL-3.0.0b1-py2.5.egg', '/usr/local/lib/python2.5/site-packages/OpenGLContext-2.1.0a2-py2.5.egg', '/usr/local/lib/python2.5/site-packages/PyVRML97-2.2.0a1-py2.5-linux-i686.egg', '/usr/local/lib/python2.5/site-packages/PyDispatcher-2.0.1-py2.5.egg', '/usr/local/lib/python2.5/site-packages/FontTools_numpy-2.1a1-py2.5-linux-i686.egg', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', '/usr/local/lib/python2.5/plat-linux2', '/usr/local/lib/python2.5/lib-tk', '/usr/local/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/local/lib/python2.5/site-packages/PIL']
>>> 
jason@jason-ubuntu:~$ 

Thanks for the help guys, sorry to be a pain.

Well, it’s pretty clear from looking at those paths that something went wrong. Panda3D isn’t fully installed. I don’t know why.

I’m going to rev up my gutsy machine and see if I can analyze the situation a little bit. I’ll report back in a little while.

[update] OK, I’m back. Here’s what I have to report:

  • It installs correctly on my gutsy box.

  • My gutsy box uses python 2.5.

  • The deb package installs a file /usr/lib/python2.5/site-packages/panda3d.pth

On my machine, that pth file causes panda to be inserted into the python path. It doesn’t seem to be working on your machine. So my question would be: is that file present on your machine?

If it isn’t present, we have to figure out why the DEB package didn’t get fully extracted. If it is present, we have to figure out why your copy of python isn’t responding to the presence of pth files.

Yep, panda.pth is there with the contents
/usr/share/panda3d
/usr/lib/panda3d
Is that identical to yours? If so, this appears to be a Python problem, and I can go ask somewhere with Python support. Also, would sys.path.append("/usr/share/panda3d") and sys.path.append(“usr/lib/panda3d”) do the trick? I thought I tried this earlier, but then when I opened up another shell it hadn’t stuck. Thanks for all the help.

That is indeed what’s supposed to be in there.

Go ahead and try appending those directories to sys.path. It might work. But it still raises the question of why the PTH file isn’t working. I’d like to know the answer to that - if you find out, please tell me.

On your installation is panda3d.pth a link? Every other .pth file is, but not panda3d.pth. If so, what does it link to?

Since using sys.path.append() from the interpreter didn’t appear to be persistent, I tried another tactic. However, adding sys.path.append(’/usr/share/panda3d’) to Tut-Asteroids.py doesn’t work either. Although it appears their isn’t a direct.directbase.DirectStart. Under /usr/share/panda3d there is direct/src/directbase/DirectStart, but adding .src didn’t solve it.

I leave town for a week at 3:30 this morning, but when I get back hopefully I can solve this.

EDIT: It struck me that I put sys.path.append after import direct. I put import sys, sys.path.append() before that, and it appears to have worked, but now it throws me different errors.

DirectStart: Starting the game.
Traceback (most recent call last):
  File "Tut-Asteroids.py", line 16, in <module>
    import direct.directbase.DirectStart
  File "linuxroot/usr/share/panda3d/direct/src/directbase/DirectStart.py", line 3, in <module>
  File "linuxroot/usr/share/panda3d/direct/src/showbase/ShowBase.py", line 10, in <module>
  File "/usr/share/panda3d/pandac/PandaModules.py", line 1, in <module>
    from libpandaexpressModules import *
  File "/usr/share/panda3d/pandac/libpandaexpressModules.py", line 1, in <module>
    from extension_native_helpers import *
  File "/usr/share/panda3d/pandac/extension_native_helpers.py", line 38, in <module>
    from libpandaexpress import *
ImportError: /usr/lib/panda3d/libpandaexpress.so: undefined symbol: PyUnicodeUCS4_AsWideChar

This is the error that made me give up on Python-Ogre. Anybody here know anything about it?

That file is just a file, not a symbolic link. And yes, you’re right, the other pth files in that directory are symbolic links… interesting. But it should work as a simple file.

It’s something to do with the Unicode size Python is encoded in, however, I recompiled Python in a different size as kind of guest work, and it threw me the error except this time with PyUnicodeUCS2 instead of PyUnicodeUCS4.

This deserves an emoticon… :frowning:

Did you ever try just adding the paths to sys.path?

With sys.path.append()? It wasn’t persistent, or at least how I was doing it wasn’t. Every time I Ctrl+D’ed out of Python, the next time I went back in the sys.path wasn’t with the things I appended. I need to research this Unicode problem a little deeper, and hope it doesn’t mean a recompile of Python.

I wonder if you saw my post above…(?) I posted after you, but I had started writing before you so it went it above you.