I\'m looking for a way to cleanly uninstall all versions of python on OS X 10.10 except the default version that followed with the Mac. How do I proceed?
Currently
The file /usr/bin/python
(and /usr/bin/pythonw
, which is a hard link to the same file) is actually a launcher program that invokes the default version of Python from /System/Library/Frameworks/Python.framework/Versions
. You can select the version (2.6 and 2.7 in Yosemite) the launcher invokes using either the defaults
command or the VERSIONER_PYTHON_VERSION
environment variable.
If you want to run a specific version manually, you can invoke /usr/bin/python2.6
or /usr/bin/python2.7
, which are symbolic links into /System/Library/Frameworks/Python.framework/Versions
.
You should be fine removing all other Python implementations you list from your path, including /Library/Frameworks/Python.framework/Versions/2.7/bin/python
(not sure how you got that one). It would still be wise to move them somewhere (e.g. your trash folder) to test your change before deleting them permanently.