mountain lion doesn't use latest system python?

Hi there,

I saw that Mac 10.8 was using python 2.7.2 as system version, and since Panda3D is suppose to compile off the default system version, I assumed Panda3d would use 2.7.2 on Mac 10.8. It appears I was mistaken, as ppython is pointing to 2.5, not 2.7, and if I try to use Panda3d with 2.7, it gives me an error:

ppython -V Python 2.5.6 /usr/bin/python -V
Python 2.7.2
$ /usr/bin/python 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

If I try to use ppython, it tries to start, but wants X11 to be installed.

I’m bummed, because I really didn’t want to upgrade; I only upgraded because I thought Panda3d would now use a more recent version of Python. I even uninstalled Panda3d and re-installed it, to no avail. :frowning: Could this be something stupid I did, or does Panda3d not use 2.7 on Mountain Lion?

Panda supports older versions of OSX, which means the downloadable version is compiled against an older version of Python. If you require Panda to use a newer version of Python I believe you will need to compile it yourself from the source code with the desired version of Python.

I wish this had been clear before I upgraded. I swear I had seen references to Panda3D using 2.7 on Mountain Lion. Oh, well, I guess I’ll be compiling after all. Maybe someone else will learn from my mistake.

~maria

There are experimental 64-bits builds floating around the forum compiled against Python 2.7, such as this one:
rdb.name/Panda3D-1.9.0.dmg
(it’s not complete, as it lacks support for some thirdparty packages such as ffmpeg, and it’s a relatively old build on top of that.)

I managed to get Panda3d working with 2.7.5 python. I used the installer and then linked ppython to the 2.7 version, and so far everything seems to work.

sudo rm /usr/bin/ppython sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/
MacOS/Python /usr/bin/ppython

I have to start my panda files by using:

$ arch -i386 ppython panda_file.py

Since ppython isn’t linked to system Python, the export VERSIONER_PYTHON_PREFER_32_BIT=yes doesn’t work. I also had to install XQuartz, since X11 is no longer installed on Mountain Lion.

xquartz.macosforge.org/landing/

I also did this:

sudo cp /Library/Python/2.5/site-packages/Panda3D.pth /Library/Python/2.7/site-packages/

but I’m not sure that did anything.

I also tried to compile myself, but that was a bit of a nightmare, and this seems to be okay.