views:

108

answers:

4

Python 2.7 has two different disk image installers for Mac OS X. My questions are:

  1. What are the differences between the two Python 2.7 disk image installers?
    1. Python 2.7 32-bit Mac OS X Installer Disk Image for Mac OS X 10.3 through 10.6
    2. Python 2.7 PPC/i386/x86-64 Mac OS X Installer Disk Image for Mac OS X 10.5 or later
  2. If running Mac OS X 10.6 Snow Leopard without the 64-bit kernel and extensions, which is the more appropriate version of Python 2.7 to install?
  3. Why are there two different Mac OS X disk image installers for Python 2.7 when Python 2.6.5 and Python 3.2 each only have one?
  4. Does the first listed installer support PPC? Strange that it wouldn't if it support back to Mac OS X 10.3, but unlike the second installer PPC isn't listed.
A: 

Looks like all the other versions only have a 32 bit port? So a "new feature" of 2.7 is a 64 bit port. If you aren't running a 64 bit OS and don't need programs that can use > 4 GB of ram, you can stick with the 32 bit.

bwawok
A: 

1) You almost certainly want "Python 2.7 PPC/i386/x86-64 Mac OS X Installer Disk Image". It's also a close analogue of the 2.6.x version that comes with 10.6 by default.

2) Unless you know you need 32-bit versions for some reason, default to 64-bit for everything on Snow Leopard. It's what will most closely match the rest of the the apps/libraries/userland. The kernel is irrelevant in this regard. The 32-bit OS X kernel can and will still run 64-bit userland.

3) 64-bit versions weren't available before 10.6.

Nicholas Knight
A: 

Python Issue 7473 appears to shed light on why there are two installers and the differences.

Matthew Rankin
+2  A: 

As others have pointed out, the second (64-bit) installer variant is new on python.org starting with 2.7 and future releases of 2.7 and 3.2 will have both 32-bit-only and a 32-/64-bit variants. The newer variant is an attempt to add out-of-the-box support from python.org for Intel 64-bit (x86_64) processes which is the default for new applications in OS X 10.6.

However, the python.org installer goes a bit further and tries to support x86_64 on OS X 10.5 as well and that has caused some serious problems. In particular, the installer was linked with Tk 8.4 for which Apple does not supply a native 64-bit version on either 10.5 or 10.6. This means that IDLE and any other Python program that uses Tkinter fails on 10.6 in the default 64-bit mode (and for various reasons it is not straightforward to run IDLE in 32-bit mode on 10.6). And, of course, they will fail on 10.5 if 64-bit mode is forced. Apple does supply a 64-bit version of Tk 8.5 but only on OS X 10.6. For this and other reasons, the current plan is to change the 32-bit/64-bit variant in future releases to only support 10.6 or higher and only include 32-bit (i386) and 64-bit (x86_64) support, no PPC.

So if you anticipate needing IDLE or Tkinter on 10.6, you should consider sticking to the traditional 32-bit-only 2.7 installer for now until a newer 10.6-only installer is available (which might not be until the next maintenance release of 2.7).

As to question 4, at the moment, both installers support PPC 32-bit: the first on 10.3 through 10.6, the second on 10.5 & 10.6. But the second will disappear in the future. And, although OS X 10.6 will not boot on PPC machines, it is possible to run Python (and most other programs) in PPC mode if the Rosetta emulation package is installed in OS X.

Ned Deily
Ned — Great answer as always. Thanks for the insight and details.
Matthew Rankin
BTW, the 2.7 Tk/IDLE problem is documented here http://bugs.python.org/issue9227 and the thread beginning here: http://mail.python.org/pipermail/pythonmac-sig/2010-July/022467.html
Ned Deily