I'm having difficulty installing python 3 on snow leopard.
I'm having difficulty because I have no idea what I am installing. (I do understand that python is a language, and that it uses a virtual machine)
Where can I get an overview of all the parts that make up working installation of python and how they need to be configured?
I want to understand this so that I can use python 3, but not break the other installations on my system.
There is normally no need to build Python on Mac OS X from source. If you want the most recent Python 3, download and install one of the two official Python 3.2 installers for OS X from python.org here. The Python installers from python.org install a framework build of Python 3 rooted at
/Library/Frameworks/Python.framework/Versions/3.2
In that directory, you will find bin
, lib
, and other directories unique to that version. If you install another Python versions (say, 2.7) using python.org installers, it will be be installed under /Library/Frameworks/Python.framework/Versions/2.7
, completely independent of the 3.2
version. There will also be a version of IDLE.app
and other files installed into /Applications/Python m.n
(3.2, 2.7, etc.). The Apple-supplied system Pythons (2.6.1 and 2.5.4 for OS X 10.6) are installed in:
/System/Library/Frameworks/Python.framework/Versions/
again a completely separate location. Thus, the system Python files do not need to be and should not be altered or removed. The python.org installers have the option to alter your shell PATH
variable to prepend the appropriate framework bin
directory to your path so that the newly installed Python will be found first. With Python 3 there is no conflict anyway, since you need to invoke it by python3
, rather than python
.
The python.org installers also have the option to install symlinks from /usr/local/bin
to the important files in the framework bin
directory but, for various reasons, those are not particularly useful. In general, you need to include the framework bin directory in your execution PATH; with that, the /usr/local/bin
symlinks are usually not needed.
If you are really interested in the details, download the source tarball and examine configure.in
and the top level makefile. The script that is used to build the installer is in Mac/BuildInstaller
.
For additional information about Python on Mac OS X and the use of Tkinter, IDLE, and Tcl/Tk, see this page.