Remove Python 2.7 Mac

Why would you install Python 2.7.n on macOS Sierra 10.12.5 when the operating system installs 2.7.10 already? How did you install Python 2.7.n on your Mac? A specific package manager (homebrew, macports, etc)? Downloaded a pre-compiled, framework build from python dot org? Downloaded source code from python dot org, compiled, and installed? How to Uninstall Python 2.7 on Mac. Generally, the approach to uninstallation of Python 2.7 from Mac shares a lot of similarities with the one described above. Shut down all running python processes on your Mac before you attempt to remove the application folder. A protip by silvercorp about python, console, and mac. Coderwall Ruby Python JavaScript Front-End Tools iOS. More Tips Ruby Python JavaScript Front-End Tools iOS PHP Android.NET Java Jobs. Remove the Python 2.7 applications directory sudo rm -rf '/Applications/Python 2.7' Remove the symbolic links in. /usr/local/bin.

Many times we ran into problems where nothing related to Python seems working fine and we want to uninstall it completely and re-install it to remove the problem.

So, in this post, we are going to see How to uninstall Python on Windows, Mac and Linux.

Uninstall Python on Windows

Uninstall python 2 on mac

Uninstalling Python on Windows is an easy task. You just need to follow some steps and you are good to go.

Below are the steps to uninstall Python from Windows.

  1. Open Control Panel
  2. Click on Uninstall a Program
  3. Scroll down till you see the installed Python version and Select it and click uninstall for each version.

Once you are done with the above step, you are left with one final step; Removing it from Path.

Although the python uninstaller removes itself from the path, it’s recommended to manually check the path to be sure.

To remove Python from the system path, follow the below steps and it will be removed permanently.

  1. Click on the Windows button and search “Environment Variables“.
  2. In the Environment Variables window, click on Path variable in the system variable section, click the edit button.
  3. Look for the path of the Python bin folder and remove it from the path.

And you are done. This is going to Uninstall Python from the Windows machine.

Uninstall Python on Mac

Mac ships with Python pre-installed and it is a very bad idea of uninstalling them.

If you try to uninstall the pre-installed Python v2.7 or above, it may break your operating system. I recommend not touching it.

If you’ve installed any third party python framework, you can follow the below steps.

Open your terminal and paste the below commands.

sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7

Remove the Python 2.7 applications directory

sudo rm -rf '/Applications/Python 2.7'

Remove the symbolic links, that point to this Python version. See them using

ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7'

and then run the following command to remove all the links:

cd /usr/local/bin/ ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | tr -d @ | xargs rm

You can find the complete details here on Stackoverflow.

Uninstall Python on Linux (Ubuntu)

The same problem may arise if you’ll try to uninstall pre-installed Python in your Linux/Ubuntu. It is not recommended to remove the default Python from Ubuntu.

It can cause the Graphical Display Manager to fail because of uninstalling Python.

You can only uninstall Python which you installed manually.

Remove Python 2.7 Mac Catalina

Below is the command for uninstalling Python.