Uninstall Python 2.7 from Mac OS X El Capitan

Viewed 24596

I want to completely reinstall Python 2 but none of the guides I have found allow me to uninstall it. No matter what I do, python --version still returns 2.7.10, even after I run the Python 2.7.11 installer. All the other guides on StackOverflow tell me to remove a bunch of files, but python is still there.

3 Answers

Agree with the accepted answer that uninstalling is a bad idea, but for those of you using HomeBrew to install your own Python, you don't need an alias as in @Mat Marsiglio's answer. Rather you can do what the HomeBrew installation suggestions:

export PATH="/usr/local/opt/python/libexec/bin:$PATH"

This gives brew's python precedence over the built-in one at /usr/bin/python

Related