banner



How To Uninstall Python On Windows

"

This article is part of in the series

Last Updated: Wednesday 29th December 2021

Every version of Python comes with bug fixes and security patches. To ensure that yous're not affected by bugs and security issues that take been stock-still, removing the onetime version is necessary.

While yous tin use more than one Python version on the same computer, installing a new version of Python before removing the old ane sometimes breaks Python on the computer.

Thankfully, uninstalling Python before installing the new version fixes information technology, and doing it isn't very difficult. We've broken downwards how to remove Python on every operating organization in this postal service.

How to Uninstall Python From Windows, Mac, And Linux

There is no standard way to uninstall Python on operating systems. You will need to follow uninstallation steps specific to the operating system on your computer.

Note: If you desire to remove Python packages from your figurer, you do not need to uninstall Python from your computer. Y'all can add, remove, and search for specific Python packages using the pip tool. If you don't know how to utilise pip, our detailed guide will teach you lot what you lot need to know in a affair of minutes.

How To Uninstall Python From Windows

Windows makes it like shooting fish in a barrel to uninstall Python. Yous tin remove any version of Python installed on your estimator in three simple steps.

Pace #one: Navigate to the Control Panel

Press the Windows key on your keyboard or press the Windows button on the lesser-left of your screen to open the Kickoff menu.

Type in "Control Panel" and find and launch the Control Panel from the list of options.

Windows Opening Control Panel

Step #2: Navigate to the Uninstall Menu

Afterwards the Control Panel opens upward, y'all must click on the "Uninstall a programme" button under the "Programs" department on the lesser left.

Windows Control Panel

A menu with all of the programs installed on the estimator will open up.

Stride #3: Uninstall Python

You must scroll downwardly the list of programs and notice the version(southward) of Python installed on your computer. Next, select the program by left-clicking on it and click the "Uninstall" button.

Windows Uninstalling Python

The uninstallation magician will launch, and after y'all confirm your decision to uninstall Python, information technology will be removed from your calculator.

To remove Python from your computer completely, you will need to remove Python from Path.

Step #4: Remove Python from Path

The Python uninstaller automatically removes Python from Path when it runs. That said, it is best to bank check whether Python has been removed from Path. Information technology'south easy to do and doesn't accept long:

  1. Press the Windows key and enter "environment variables." Launch the settings carte in the Control Console.Windows Search Environment Variables
  2. A "System Properties" menu will appear. Find and click the "Environment Variables" push. Windows System Properties Menu
  3. Highlight the "Path" variable in the organization variable section by left-clicking it. So press the "Edit" push. Windows Environment Variables Menu
  4. If yous see a path of the Python bin binder in the menu, remove it past selecting it and pressing the "Delete" button on the right side of the menu.Windows Edit Environment Variable

And with that, you will take removed Python entirely from your Windows estimator.

How To Uninstall Python From Mac

Uninstalling Python on a figurer running macOS is not always a good idea. This is because macOS comes with Python pre-installed, and the operating system depends on Python for its inner workings.

The pre-installed Python framework appears in /System/Library/Frameworks/Python.framework. Several symlinks can be institute in usr/bin/python.

Removing this version of Python will pause macOS and may cause the OS to malfunction. You can read more about this at Stack Exchange's Q&A site for programmers, Stack Overflow .

That said, if you've installed a third-political party Python framework on your Mac, you can uninstall it safely. Here'southward how you do it:

Step #1: Remove Python from Applications

Open up Finder, and navigate to the Applications binder. Hither, you will find folders of the Python version(southward) you accept installed. You must move them to the Trash.

If y'all only want to remove a specific version of Python from your Mac, brand sure you only move the relevant Python binder into the Trash.

Mac Python Folder In Applications

If a dialog box appears request yous to enter the password to your computer, enter the password and click "OK."

Mac Move To Trash Dialog Box

The folders will have moved to the Trash. Next, you must navigate to the Trash, highlight the Python version(s), and right-click. From the options that appear, select the "Delete Immediately" choice.

Mac Delete Immediately

Deleting the binder will non remove Python from the computer completely. You must remove it from the Library directory and likewise remove the symbolic links.

Step #2: Remove Python from /Library

You volition need to utilize the Terminal to remove Python from the Library directory. To open up Terminal, press Cmd + Infinite and search for it, and so launch it.

To remove the tertiary-party frameworks from the directory, enter the following command into Final:

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

You may exist asked to enter your system password. Enter it if prompted.

If yous want to remove simply a specific version of Python from your computer, specify the version past modifying the command similar so:

sudo rm -rf /Library/Frameworks/Python.framework/Versions/three.viii

Step #three: Remove Symbolic Links

Steps #1 and #2 will have removed Python directories and files from your Mac. However, links that reference Python folders that have been deleted may remain on your computer. These links are called symbolic links (or symlinks).

There are two ways to remove these links from your estimator:

#1 Manual Deletion

The links that reference Python folders are in /usr/local/bin. Since the folders that are referenced in the links no longer be, these links will be broken.

You tin see all of the broken symlinks past entering the following control in the Terminal:

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

If you've only removed a specific version of Python, brand sure you lot replace the path in the higher up command with the path you used in step #2.

Afterwards y'all see all the broken links, use these commands to delete them:

To enter the directory:

To delete the cleaved links:

ls -50 /usr/local/bin | grep '../Library/Frameworks/Python.framework' | awk '{print $ix}' | tr -d @ | xargs rm*

If the path in the command above is unlike from the path yous used in step #2, replace the path in the control above with the one yous used.

After you run these commands, the installed Python version will exist removed from your Mac.

#two Using Homebrew

You can besides remove the broken symlinks from your computer using Homebrew. If you lot don't have it installed, run the following command to install it:

/bin/bash -c "$(curlicue -fsSLhttps://raw.githubusercontent.com/Homebrew/install/chief/install.sh)"

Finding broken links is much easier with Homebrew. To find them, run this command:

A list of cleaved symlinks will appear. Y'all can and then use the post-obit command to remove them:

How To Uninstall Python From Linux

Linux is similar to macOS – in that Python comes pre-installed on the operating system. Further, removing the pre-installed version of the software causes the Os to malfunction.

Typically, the Graphical Brandish Manager fails when Python is uninstalled from Linux.

For this reason, you lot can merely uninstall the Python versions that you installed manually.

To remove the version of Python yous installed, utilise the following control on the Terminal:

sudo apt purge -y python2.x-minimal

You can remove Python iii from Linux distros using this command:

sudo ln -s /usr/bin/python3 /usr/bin/python

To remove pip from the organisation:

sudo apt install -y python3-pip

sudo ln -due south /usr/bin/pip3 /usr/bin/pip

If you find that the commands aren't working, y'all may demand to update your repo listing using sudo apt get update .

Determination

And with that, you know how to uninstall Python from your computer completely.

Yous tin can at present install the latest version of Python on your estimator without worrying about it breaking or dealing with bugs that accept already been fixed.

To ensure you install the new Python version on your computer safely, brand sure you become through our Python installation guide . If this post helped or yous think we can better this reply, allow usa know in the comments.

Source: https://www.pythoncentral.io/how-to-uninstall-python/

Posted by: dawsonwounce.blogspot.com

0 Response to "How To Uninstall Python On Windows"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel