On my OS X typing /usr/bin/python in to terminal runs Python 2.6.1, but typing python runs Python 2.7.2. I'd like the former to run 2.7.2 as well - how do I do this?
The version in /usr/bin/python is the version installed as part of OS X. Type 'which python' to find out where your newer python version is located. You've probably installed a newer version via MacPorts or the like.
It might be dangerous to change where /usr/bin/python points to in case it is needed by other apps. You can change your python scripts so that they find the user's version of python by changing the first line from:
If you really want to replace /usr/bin/python, you can do it like this:
However, like I said, that might be dangerous. If you need to revert this change later you can run:
Please run these with care though. If you accidentally remove your system installed python version on OS X there will be some pain involved in getting it back.