I have a current OSX (10.10.3) with current xcode tools. I just installed the latest stable panda and tried the asteroids demo.
This problem has been posted before but the replies don’t seem to fix the problem. I recently installed MacPython which may be relevant because it installs a different python but I thought ppython was supposed to work around such conflicts. I get the same error if I use /usr/bin/python instead. I am an experienced unix/python developer though not on the Macintosh.It would help if I knew such things as where panda gets installed and how that location is passed to the python interpreter. Automated installers are simple to use but they hide all details needed for debug.
papa:Asteroids steve$ ppython Tut-Asteroids.py
Traceback (most recent call last):
File “Tut-Asteroids.py”, line 13, in
import direct.directbase.DirectStart
ImportError: No module named direct.directbase.DirectStart
What I’m guessing is that you installed MacPython on top of the built-in Python installation, which is bad. In general, on Mac OS X, it is better not to mess with the Python installation. Is there a reason why you can’t use Apple’s provided Python version?
Also make sure that you installed Panda 1.9.0, not 1.8. 1.9.0 addresses some important issues relating to Mac 10.10.
To help diagnose the issue, you should run ppython and print out sys.path.
rdb, you are awesome! A lot of your posts on other threads have helped me too
However, I still have one more question
When I run asteroids/main.py in IDLE:
ImportError: No module named direct.showbase.ShowBase
It runs if I use “ppython main.py”, but is there a way to get IDLE to recognize the modules? (I’m gonna take a guess that it might have something to do with the version of python IDLE is running?) Thanks!
Yes, perhaps IDLE is using a different Python version. If it’s a compatible version, you might be able to get it to recognise the Panda3D modules by placing a .pth file in the right location, but I wouldn’t count on it.