Uninstall Python from Mac OS X

The Apple-provided build of Python is installed in /System/Library/Frameworks/Python.framework and /usr/bin/python, respectively. You should never modify or delete these, as they are Apple-controlled and are used by Apple or third-party software. Remember, that if you choose to install a newer Python version from python.org, you will have two different but functional Python installations on your computer, so it will be important that your paths and usages are consistent with what you want to do. [Using Python on a Macintosh]

After installing a separate version of Python 2.7 from python.org on my Mac OS X Version 10.9.2, I wanted to remove it, in favor of going to a homebrew installation of python. Here are the steps I used to uninstall the framework:

  1. Remove the Python 2.7 framework – sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
  2. Remove the Python 2.7 applications directory – sudo rm -rf “/Applications/Python 2.7”
  3. Remove the symbolic links in /usr/local/bin that point to this python version – ls -l . | grep ‘../Library/Frameworks/Python.framework/Versions/2.7’ | awk ‘{print $9}’ | xargs rm

 

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.