Differences between revisions 17 and 18
Revision 17 as of 2009-02-20 21:30:41
Size: 2488
Editor: 140-182-134-41
Comment:
Revision 18 as of 2009-03-11 18:55:03
Size: 2595
Editor: 2002:c10b:e728:4:219:e3ff:fe3d:9a39
Comment:
Deletions are marked like this. Additions are marked like this.
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", back up your .bash_profile before you install.  (before you install, what does it mean? before going to step3 or before double clicking MacPython.mpkg?)

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.

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", back up your .bash_profile before you install. (before you install, what does it mean? before going to step3 or before double clicking MacPython.mpkg?)

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.

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.