Differences between revisions 17 and 19 (spanning 2 versions)
Revision 17 as of 2009-02-20 21:30:41
Size: 2488
Editor: 140-182-134-41
Comment:
Revision 19 as of 2009-03-11 22:05:20
Size: 2811
Editor: adsl-99-146-137-166
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Mac OS X 10.5.x (Leopard) comes with the 2.5.1 Python distribution pre-installed, with an integrated Python Launcher.app. At the time of Leopard's launch, the official release version of Python was also 2.5.1.  (Python has since progressed to 2.6.1 and 3.0.1.) So some users may wish to avoid installing the pythonmac.org distribution and use the built-in python. However, the built-in python does not include IDLE.app and the standard pythonmac.org distribution will not allow its installation without the installation of at least a complete, redundant Python.framework. Python releases have progressed far enough that it is probably worth installing the current MacPython distribution, however there may be conflicts between MacPython installations and Mac OS X development tools, such as problems building PyObjC applications in Xcode. Mac OS X 10.5.x (Leopard) comes with the 2.5.1 Python distribution pre-installed, with an integrated Python Launcher.app. At the time of Leopard's launch, the official release version of Python was also 2.5.1. So some users may wish to avoid installing the pythonmac.org distribution and use the built-in python. However, the built-in python does not include IDLE.app and the standard pythonmac.org distribution will not allow its installation without the installation of at least a complete, redundant Python.framework.
Line 11: Line 11:
2. In Finder, do a Show Package Contents on "MacPython.mpkg", back up your .bash_profile before you install. 2. In Finder, do a Show Package Contents on "MacPython.mpkg" and navigate to Contents > Packages > PythonApplications-2.5.pkg.
Line 13: Line 13:
3. Navigate to Contents > Packages > PythonApplications-2.5.pkg; double click and install it. This only installs stuff (including IDLE.app) in "/Applications/MacPython 2.5", so it won't interfere with your system install of Python. Also, the installer will let you chose a custom folder to install it into.
  
[Note: The installer modifies ~/.bash_profile, so you may wish to make a backup copy before proceeding with the next step.]

3. Double click PythonApplications-2.5.pkg and install it. This only installs items (including IDLE.app) in "/Applications/MacPython 2.5", so it won't interfere with your system install of Python. Also, the installer will let you chose a custom folder to install it into.

Python releases have progressed far enough that it is probably worth installing the current MacPython distribution, however there may be conflicts between MacPython installations and Mac OS X development tools, such as problems building PyObjC applications in Xcode. Mac OS X 10.5.x (Leopard) comes with the 2.5.1 Python distribution pre-installed, with an integrated Python Launcher.app. At the time of Leopard's launch, the official release version of Python was also 2.5.1. So some users may wish to avoid installing the pythonmac.org distribution and use the built-in python. However, the built-in python does not include IDLE.app and the standard pythonmac.org distribution will not allow its installation without the installation of at least a complete, redundant Python.framework.

Some people have legitimate reasons for wanting to install IDLE on Leopard. E.g., even though Leopard's Xcode 3.0 (and later) supports Python development, it does so in a heavyweight, support-all-of-Cocoa fashion. And educators teaching Python who wish to do so in a platform-agnostic way may also be best served by IDLE.

The following steps will allow the installation of IDLE.app (and other MacPython 2.5 extras, such as Build Applet.app) on a Leopard machine without any redundant elements and without any conflicts with the pre-installed Python environment:

1. Download and mount:

2. In Finder, do a Show Package Contents on "MacPython.mpkg" and navigate to Contents > Packages > PythonApplications-2.5.pkg.

[Note: The installer modifies ~/.bash_profile, so you may wish to make a backup copy before proceeding with the next step.]

3. Double click PythonApplications-2.5.pkg and install it. This only installs items (including IDLE.app) in "/Applications/MacPython 2.5", so it won't interfere with your system install of Python. Also, the installer will let you chose a custom folder to install it into.

4. In Terminal, create a symbolic link for the system's Python.framework in the location expected by the pythonmac.org tools, like so:

  • cd /Library/Frameworks
    sudo ln -s /System/Library/Frameworks/Python.framework/ Python.framework

You're done! IDLE.app works as intended. And since the pythonmac.org distro is the same 2.5.1 release as comes pre-installed with Leopard, there shouldn't be any module/interpreter compatibility issues.

It is recommended that you delete the newly installed Python Launcher.app, because it is already present inside the system Python.framework. If you have installed Apple's developer tools (Xcode et al), it is recommended that you delete the newly installed Build Applet.app, because it is already present in /Developer/Applications/Utilities/MacPython 2.5.

MacPython/Leopard (last edited 2011-08-20 20:48:45 by NedDeily)

Unable to edit the page? See the FrontPage for instructions.