I've read through several questions and pages on the how and why of this, but after taking a look on my mac yesterday I found that I currently have 6 versions of python on my machine.
Three are located in /Library/Frameworks/Python.framework/Versions (2.5, 3.1, 3.2), and then I have three more in /System/Library/Frameworks/Python.framework/Versions (2.5, 2.6, and another).
Terminal seems to use MacPython 2.5 from the first path. I found that it is recommended that I let my Mac itself use MacPython and that I don't try to change that. I managed to add a 3.2 reference from the first path to $PATH, but Terminal doesn't really seem to pick up on that.
For Python development I have used IDLE in the past, but it doesn't have any syntax highlighting, and so I moved over to TextMate.
I have several questions: - Why are there so many versions and are they all being used? - How can I get all programs to use the same version? - Why do some versions have IDLE and some don't, and more importantly why do the ones that don't, have all the 'Extras' installed, like PyOBjC?
How to know which Python is the used:
In the Terminal, type which python
. It will show you the path to the active Python.
Why so many versions:
Probably leftovers of previous system upgrades: Tiger -> Leopard -> Snow Leopard, maybe.
How to point everything to the Python you want:
In your .profile
or .bashrc
add the line:
alias python='/path/to/the/python/of/your/choice'
I'd recommend to install Python via MacPorts. It's well maintained and comes with a CLI "chooser" allowing you to, well… choose the active Python.