Chat Zalo Chat Messenger Phone Number Đăng nhập
How to Uninstall Python on Windows, Mac and Linux

How to Uninstall Python on Windows, Mac and Linux

Many times we come across issues where nothing related to Python seems to work fine and we want to uninstall it completely and reinstall it to eliminate the problem.

So, in

this post, we are going to see how

to uninstall Python on Windows, Mac and Linux.

How to uninstall Python on Windows, Mac and Linux Uninstall

Python on Windows

Uninstalling Python on Windows

is an easy task. You just need to follow a few steps and you’re ready to go.

Below are the steps to uninstall Python from Windows.

  1. Open Control Panel
  2. Click Uninstall

  3. a program Scroll
  4. down until you see the version of Python installed and select it and click Uninstall for each version.

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

Although the Python uninstaller is removed from the path, it is recommended to manually check the path to be sure.

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

Click the

  1. Windows button and search for “
  2. Environment Variables”. In the Environment Variables window, click Path Variable

  3. in the System Variable section, click the Edit button. Locate the path of the Python bin folder and delete it from the path
  4. .

And that’s it. This will uninstall Python from the Windows machine.

Uninstall Python on

Mac

Mac ships with Python pre-installed and it’s a very bad idea to uninstall them

.

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

If you have installed any third-party Python framework, you can follow the steps below.

Open your terminal and paste the following commands.

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

application directory

sudo rm -rf

“/

Applications/Python 2.7″

Remove symbolic links pointing to this version of Python. View them using

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

and then run the following command to remove all 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 full details here on Stackoverflow

. Uninstall Python on Linux (Ubuntu) The same problem may arise if you try

to uninstall

Python pre-installed on your Linux/Ubuntu. It is not recommended to remove the default Python from Ubuntu.

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

You can only uninstall Python that you installed manually.

Below is the command to uninstall Python.

Sometimes you also have to update your apt repo list. Here is the command for the same.

sudo apt get update

Well, this was all about how to uninstall Python and I hope you understood uninstalling Python for your operating system

.

If you have found this post useful, please share it with your friends or colleagues looking for python programming.

And if you have started with Python development and got stuck in some kind of problem or bug, you can leave your comment here and we will get back to you soon.

Contact US