问题
Python 2.7 has two different disk image installers for Mac OS X. My questions are:
- What are the differences between the two Python 2.7 disk image installers?
- Python 2.7 32-bit Mac OS X Installer Disk Image for Mac OS X 10.3 through 10.6
- Python 2.7 PPC/i386/x86-64 Mac OS X Installer Disk Image for Mac OS X 10.5 or later
- 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?
- 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?
- 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.
回答1:
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.
回答2:
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.
回答3:
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.
回答4:
Python Issue 7473 appears to shed light on why there are two installers and the differences.
来源:https://stackoverflow.com/questions/3472349/what-are-the-differences-between-the-two-python-2-7-mac-os-x-disk-image-installe