Mac OSX: Switch to Python 2.7.3
command-line-interface, macos, python, python-2.7, version
Solution
The python.org install will put a python executable in /usr/local/bin . Apple's python is in /usr/bin
To call the python.org python you can use its full path /usr/local/bin/python or change your path to put /usr/local/bin before /usr/bin. You will still be able to call Apple's python by using its full path /usr/bin/python
Some python installs e.g. Macports provide a tool that provides symbolic links to various python installs and allows you to switch between them.
Problem
I've installed the Mac OSX Python 2.7.3, and tried switching to the new version: ``` $ python2.7 -V Python 2.7.3 # It was installed $ python -V Python 2.6.1 # Default is 2.6 $ export VERSIONER_PYTHON_VERSION=2.5 $ python -V Python 2.5.4 # I can switch to 2.5 $ export VERSIONER_PYTHON_VERSION=2.6 $ python -V Python 2.6.1 # And 2.6 ``` But: ``` $ export VERSIONER_PYTHON_VERSION=2.7 $ python -V python: VERSIONER_PYTHON_VERSION environment variable error (ignored) Python 2.6.1 ``` Can't switch to 2.7! Why is that?