To completely remove Python 2.7 from my Mac OS X 10.6:
Remove the entry from the PATH variable by reverting my .bash_profile, edit or delete the file:
nano .bash_profile (remove the PATH lines added by the Python installer, they are commented, so you'll se them easily)Remove the Python 2.7 framework:
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7Remove the Python 2.7 applications directory
sudo rm -rf "/Applications/Python 2.7"Remove the symbolic that point back to the 2.7 framework in /usr/local/bin:
Find them with the following ls command, then remove with sudo rm -rf like in the previous steps.
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7'In my case, I typed the following commands following the output of the previous ls line:
sudo rm -rf 2to3 idle idle2.7 pydoc pydoc2.7 python python-32 python-config pythonw pythonw-32 smtpd.py smtpd2.7.py
Information taken from:
Credits to the users listed there, especially Ned, who answered the question in such a clear and concise way.