For an excellent and concise version of this please read http://dev.fprimex.com/learning-python/installing-python-on-mac
It also includes extremely easy instructions on installing the excellent SPE Python editor.
With Python when you want to install a package on the Internet you can either manually install it or use the Python Package Index.
The Python Package Index is a repository of software for the Python programming language. There are currently are nearly 4,000 packages as of April 2008.
This post is based on my experience on following the installation instructions for the Easy Install
To install it on OX X 10.5 Leopard you must do the following
1. Create a folder for you python files to be run from, e.g. ~/bin
2. Update ~/.profile to include ~/bin in the search path.
3. Make a new text file called .pydistutils.cfg in the ~/ folder
With a user named frodo, we would have:
install_lib = /Library/Python/$py_version_short/site-packages
install_scripts = /Users/frodo/bin
The default install library location for Leopard is
/Library/Python/2.5/site-packages because $py_version is replaced with 2.5, which is the version of Python which comes with Leopard.
This folder is where all your installed libraries are kept once they are downloaded and installed.
4. Download ez_setup.py, to ~/bin (in this case /Users/frodo/bin) and run it. You should get output similar to this:
[email@example.com] Tue Apr 08 ~/bin
 00:33:30–> python ez_setup.py
Copying setuptools-0.6c8-py2.5.egg to /Library/Python/2.5/site-packages
Adding setuptools 0.6c8 to easy-install.pth file
Installing easy_install script to /Users/frodo/bin
Installing easy_install-2.5 script to /Users/frodo/bin
Processing dependencies for setuptools==0.6c8
Finished processing dependencies for setuptools==0.6c8
Congratulations, it is now installed. You should see some eggs 🙂 .egg and .pth files in your site-packages folder now:
[firstname.lastname@example.org] Tue Apr 08 /Library/Python/2.5/site-packages
 01:28:18–> ls -la
drwxrwxr-x 6 root admin 204 8 Apr 00:34 .
drwxrwxr-x 3 root admin 102 9 Oct 12:33 ..
-rw-rw-r– 1 root admin 119 6 Oct 2007 README
-rw-r–r– 1 frodo admin 214 8 Apr 00:34 easy-install.pth
-rw-r–r– 1 frodo admin 324858 8 Apr 00:34 setuptools-0.6c8-py2.5.egg
-rw-r–r– 1 frodo admin 29 8 Apr 00:34 setuptools.pth
5. Now what? Have at look at the tutorial for the Python Package Index
see what you like, e.g. ipython, then:
[email@example.com] Wed Apr 09 ~/bin
 01:21:12–> easy_install ipython
Searching for ipython
Best match: ipython 0.8.2
Processing ipython-0.8.2-py2.5.eggcreating /Library/Python/2.5/site-packages/ipython-0.8.2-py2.5.egg
Extracting ipython-0.8.2-py2.5.egg to /Library/Python/2.5/site-packages
Adding ipython 0.8.2 to easy-install.pth file
Installing ipython script to /Users/frodo/bin
Installing pycolor script to /Users/frodo/bin Installed /Library/Python/2.5/site-packages/ipython-0.8.2-py2.5.egg
Processing dependencies for ipython Finished processing dependencies for ipython