Installing on Mac osx 10.6

Hi !
I’ve downloaded the file called “Panda3D-1.7.0.dmg”, launched it, and then I’ve got a Panda3D folder in my Developer folder. My question is : how to make Panda3D importable in the IDLE ?
I’ve Python 2.7 installed. Thanks you all for your help,
Siskas

Hi, welcome to the forums!

You’ll need to use Python 2.5, which is the version of Python that Panda3D is compiled against. I believe that it is present by default on the system. There’s a symlink called “ppython” which always runs the right build of Python that Panda is compiled with.

Ok, but… then, what should I do ? which file have I to run, etc. ?

I think we should move move OS X python to 2.7. What is the version that the plugin system uses? Shouldn’t we use same version across all dev kits?

The OSX system default version of Python is still 2.6 as of Snow Leopard. I dunno what version Lion will provide.

The plugin version does need to use the same version of Python across all platforms, but here we have competing goals, since the SDK prefers to use the system default Python on all platforms that provide one. Fortunately, it’s OK if the plugin Python version isn’t necessarily the same version as the SDK.

David

The reason i say this is that i was developing my game on Linux with 2.7 and then tried it on mac os x and it fails because i use @decorators. I am not sure what the runtime will do with my @decorators and {dict} comprehension. I would like it to be consistent.

Yes, but an out-of-the-box OSX installation won’t even have Python 2.7. And a Panda developer on OSX will expect to type “python” and be able to load Panda, and “python” will invoke Python 2.6.

A similar story happens on your Linux distro: there the developer also wants to be able to type “python” and load Panda, but there “python” invokes Python 2.7.

So how do you suggest we make this consistent?

David

For the record, it is still compiled with Python 2.5 on Snow Leopard.

@treeform
The runtime uses Python 2.6 across the board.

Having just gone through this whole mess, getting my application to work on OS X 10.6, I figured I’d thrown my thoughts/observations into the mix.

First, on 10.6, python 2.6 has the problem of being 64bit by default; I’ve got a nice ‘checkPythonVersion’ script that sets an environment variable and restarts python2.6 in 32bit mode, which works. I could pull the code out and share, if anyone’s interested. (The entire script is written to make sure we’re always running under the ‘optimal’ python version for the specific platform, no matter which we start, including python 3.)

Ignoring the 32bit/64bit issues, I think python 2.6 is a decent python to stick with. On the other hand, 10.7 will ship with 2.7, meaning that while it will most likely still include 2.6, it would be nice if we had builds against 2.7 available as well.

I would also like to point out that the current panda 1.7.2 works fine under python 2.6, if you copy the .pth file to the correct site-packages directory. (I have a python 2.6 only library I need to use, and the two play nice under 2.6) IIRC, python 2.6 will run something built on the python 2.5 ABI. Which means, we could simply change the installer to check for the default python, and install a .pth file there, as well as pointing ppython to the python version it was built with. That might be by far the easiest way to ensure a consistent experience.

Then it’s up to application developers to ensure the minimum python version they support on OSX. (So far, I’ve found that settling on python 2.7 to be a bad choice; not everything has 2.7 yet. With the release of Ubuntu 11.04, things have improved, but there’s still some linux distros not shipping it, and then there’s OS X…)

Totally agree with Christopher. Why not have Panda3d first check to see what Python is on the user’s path, and compile against that, instead of checking to see what the system Python is. That way if you installed a more recent version of Python for you to use, but left the system python alone, you would be able to use the more recent version. It seems unlikely Apple is going to change its release cycle, so system Python on OS X is always going to older than the versions on Linux and Windows. It does mean that different Mac users will be using different versions, but that is already the case depending on which OS version you are on. So annoying to be using Python 2.5 for Panda3D, and 2.7.5 for everything else.

~Maria

Wait, Python 2.5 and 2.6 are ABI-compatible? Are you sure about that?

By the way, makepanda compiles Panda against whatever Python version you run it with. Since the public builds are compiled on Leopard, this is Python 2.5. We will have separate builds in the future for more recent OS X versions.