Как полностью удалить python с windows 11


Загрузить PDF


Загрузить PDF

Из этой статьи вы узнаете, как удалить приложение Python и связанные с ним файлы и папки. Это можно сделать на компьютере под управлением операционных систем Windows и Mac OS X.

  1. Изображение с названием Uninstall Python Step 1

    1

    Откройте меню «Пуск»

    Windows Start

    . Нажмите на логотип Windows в нижнем левом углу экрана.

  2. Изображение с названием Uninstall Python Step 2

    2

    Нажмите «Параметры»

    Windows Settings

    . Это значок в виде шестеренки в нижней левой части меню «Пуск». Откроется окно настроек.

  3. Изображение с названием Uninstall Python Step 3

    3

    Щелкните по Приложения. Эта опция находится посередине окна настроек.

  4. Изображение с названием Uninstall Python Step 4

    4

    Найдите версию Python, которую вы хотите удалить. Прокрутите вниз и найдите приложение, в имени которого есть слово «Python» (например, «Python 3.6»).

    • Возможно, сначала вам придется щелкнуть по вкладке «Приложения и компоненты» в верхнем левом углу окна.
  5. Изображение с названием Uninstall Python Step 5

    5

    Нажмите на версию Python. Сделайте это, чтобы отобразить кнопку «Удалить».

  6. Изображение с названием Uninstall Python Step 6

    6

    Щелкните по Удалить. Эта кнопка находится под версией Python.

  7. Изображение с названием Uninstall Python Step 7

    7

    Нажмите Удалить, когда появится запрос. Запрос появится над версией Python.

  8. Изображение с названием Uninstall Python Step 8

    8

    Нажмите Да, когда появится запрос. Так вы подтвердите, что хотите удалить Python.

  9. Изображение с названием Uninstall Python Step 9

    9

    Подождите, пока Python будет удален. Откроется всплывающее окно с индикатором прогресса; как только индикатор заполнится, считайте, что Python удален.

    • Возможно, во время удаления вам придется щелкнуть по нужным опциям в открывшихся окнах.
  10. Изображение с названием Uninstall Python Step 10

    10

    Удалите другие версии Python (если необходимо). Поскольку на компьютере может быть установлено сразу несколько версий Python, поищите их в списке установленных приложений; если вы нашли другую версию Python, повторите описанные выше шаги, чтобы удалить ее.

    • Также можно удалить приложение Python Launcher.
  11. Изображение с названием Uninstall Python Step 11

    11

    Удалите папку Python 2. Если удалить Python 3, папка Python 3 будет удалена автоматически, чего не скажешь про удаление Python 2. Чтобы удалить папку Python 2, выполните следующие действия:

    • откройте окно «Этот компьютер»;
    • дважды щелкните по жесткому диску в разделе «Устройства и диски»;
    • найдите папку «Python27» (или аналогичную) в списке папок;
    • выберите папку Python, а затем щелкните по ней правой кнопкой мыши, чтобы открыть меню;
    • в меню выберите «Удалить».

    Реклама

  1. Изображение с названием Uninstall Python Step 12

    1

    Откройте Finder

    Mac Finder

    . Нажмите на значок в виде синего лица в доке.

    • Также можно щелкнуть по пустому пространству рабочего стола.
  2. Изображение с названием Uninstall Python Step 13

    2

    Нажмите Переход. Это меню в верхней части экрана. Раскроется меню.

  3. Изображение с названием Uninstall Python Step 14

    3

    Щелкните по Перейти в папку. Вы найдете эту опцию в нижней части меню. Откроется всплывающее окно.

  4. Изображение с названием Uninstall Python Step 15

    4

    Введите путь к папке с Python. В зависимости от установленной версии Python в текстовом поле «Перейти в папку» введите один из следующих путей: [1]

    • Python 3.6 и выше: /Library/Frameworks/Python.framework/Versions
    • Python 2.7: /Library/Python/Versions или /Library/Python
  5. Изображение с названием Uninstall Python Step 16

    5

    Нажмите Перейти. Эта кнопка находится в нижней части всплывающего окна. Откроется папка, в которой установлен Python.

  6. Изображение с названием Uninstall Python Step 17

    6

    Выберите папку с нужной версией. Нажмите на папку с номером нужной версии Python.

    • Например, чтобы удалить Python 3.6, щелкните по папке «3.6», чтобы выбрать ее.
  7. Изображение с названием Uninstall Python Step 18

    7

    Щелкните по Файл. Это меню находится в верхнем левом углу экрана. Раскроется меню.

  8. Изображение с названием Uninstall Python Step 19

    8

    Нажмите Переместить в корзину. Эта опция находится в меню «Файл».

  9. Изображение с названием Uninstall Python Step 20

    9

    Введите пароль, когда появится запрос. Введите пароль, который используется для входа в систему.

    • Пропустите этот и следующий шаги, если вводить пароль не требуется.
  10. Изображение с названием Uninstall Python Step 21

    10

    Щелкните по OK. Эта кнопка находится под подсказкой для пароля. Окно для ввода пароля закроется, а папка Python будет отправлена в корзину.

  11. Изображение с названием Uninstall Python Step 22

    11

    Удалите программу Python (если нужно). Не все версии Python создают папку в папке «Программы» (проверьте это, если сомневаетесь). Чтобы найти и удалить приложение Python, выполните следующие действия:

    • нажмите «Переход» в верхней части экрана;
    • в меню выберите «Программы»;
    • найдите приложение, в имени которого есть слово «Python» (например, «Python 3.6»);
    • выберите приложение, если нашли его;
    • нажмите «Файл» > «Переместить в корзину»;
    • введите пароль и нажмите «ОК».

    Реклама

Советы

  • Удаление Python 3 приведет к его удалению из списка переменных PATH.

Реклама

Предупреждения

  • Так как на компьютере может быть установлено сразу несколько версий Python, на удаление всех версий Python понадобится некоторое время.

Реклама

Об этой статье

Эту страницу просматривали 94 652 раза.

Была ли эта статья полезной?

  1. HowTo
  2. Python How-To’s
  3. Completely Uninstall Python From Windows

Lakshay Kapoor
Dec 19, 2022
Jun 14, 2021

  1. Permanently Unistall Python Using the Control Panel
  2. Permanently Uninstall Python Using the Command Prompt

Completely Uninstall Python From Windows

Python software has many bugs that need fixing from time to time. There are also many types of packages and libraries in Python that get outdated. Due to these reasons, it’s always necessary to uninstall the old Python software version and download the updated one to make the most of it, while writing any program. Hence, there are different ways to uninstall the Python software’s older version in different operating systems like Mac, Windows, and Linux.

This tutorial focuses more on demonstrating how to uninstall the Python Software from a Windows device permanently.

Permanently Unistall Python Using the Control Panel

  • Check for the Installed Python Version.

    You can use your system’s command prompt to check the installed Python software on your device. Type the following command to see the installed version that is present in the system and press enter.

    After pressing Enter, the current version of the Python software will be returned. Below is the output.

  • Use the Control Panel to Uninstall Python.

    Go to the control panel from the Window’s taskbar. After opening the control panel, select the option Uninstall a Program. A list of all the programs that are presently installed on the computer will appear. After that, search Python on the search bar. Upon searching, the Python software with its current version will be displayed. Finally, select the uninstall option to uninstall the software.

  • Re-check for Installed Python Versions.

    Again type the command mentioned in STEP 1 in the command prompt to check whether the Python Software is still installed or not. After pressing Enter, the following statement should be displayed by the command prompt.

    'python' is not recognized as an internal or external command, operable program, or batch file.
    

Note that these steps are valid for any version of Python installed on the computer, like Python 2.7.0, Python 3.7.0, or any other.

Permanently Uninstall Python Using the Command Prompt

  • Open the command prompt of the Windows system.
  • Define a proper path to access the Python file using the cd keyword in the command prompt. Look at the guide below.
    cd C:\Users\Name\Library\FileName\Python
    
  • Use the del keyword to delete the Python file after accessing it and press Enter.

After running the command above, any other Python versions can be installed using any open source such as Anaconda Navigator.

Lakshay Kapoor avatar
Lakshay Kapoor avatar

Lakshay Kapoor is a final year B.Tech Computer Science student at Amity University Noida. He is familiar with programming languages and their real-world applications (Python/R/C++). Deeply interested in the area of Data Sciences and Machine Learning.

LinkedIn

Related Article — Python Uninstall

  • Uninstall Python on macOS

Windows 7 64-bit, with both Python3.4 and Python2.7 installed at some point :)

I’m using Py.exe to route to Py2 or Py3 depending on the script’s needs — but I previously improperly uninstalled Python27 before.

Py27 was removed manually from C:\python\Python27 (the folder Python27 was deleted by me previously)

Upon re-installing Python27, it gave the above error you specify.
It would always back out while trying to ‘remove shortcuts’ during the installation process.

I placed a copy of Python27 back in that original folder, at C:\Python\Python27, and re-ran the same failing Python27 installer. It was happy locating those items and removing them, and proceeded with the install.

This is not the answer that addresses registry key issues (others mention that) but it is somewhat of a workaround if you know of previous installations that were improperly removed.

You could have some insight to this by opening «regedit» and searching for «Python27» — a registry key appeared in my command-shell Cache pointing at c:\python\python27\ (which had been removed and was not present when searching in the registry upon finding it).

That may help point to previously improperly removed installations.

Good luck!

Python programming language is a well-known programming language used in almost every field such as AI, data science, IoT, Machine Learning algorithms, etc. Sometimes, we need to uninstall Python completely from windows due to bugs or errors. We also uninstall Python when our installed version becomes corrupted.

The following methods will be discussed in this post to uninstall Python from windows completely:

  • Method 1: Using “CMD” to Uninstall Python From Windows
  • Method 2: Using “Uninstall a Program” Setting of Control Panel 

Method 1: Using “CMD” to Uninstall Python From Windows

Follow the given below steps to uninstall Python version from Windows using the “Command Prompt Terminal”:

Step 1: Find Python Location on Windows

Firstly, open the “run” dialog pop up window by pushing the “(Windows+R) button” on the keyboard, type “cmd”, and press enter to open the cmd terminal. After opening the cmd, type the below command to find the directory where Python is installed on your windows operating system:

The above snippet shows the directory where python is installed on our windows.

Note: You can check the Python version in Windows by typing the below code command:

Step 2: Change the Working Directory

The next step is to change the existing working directory of the cmd terminal using the “cd” to the path where the files of Python are placed or installed. In our scenario, the command will look like this:

> cd C:\Users\p\AppData\Local\Programs\Python\Python311

Step 3: Uninstall Python

After accessing the Python directory now, uninstall the Python using the below command:

To verify whether Python has been uninstalled, run the following command:

Method 2: Using “Uninstall a Program” Setting of Control Panel 

To uninstall Python from windows you can open the control panel from the start menu and click on the “Uninstall a program” option as shown below:

After opening the “Uninstall or Change a Program ” menu, you need to navigate to the “Python Setup” or type Python on search. Right-click on a program and click on the “Uninstall” option to remove Python from windows completely:

Clicking on the uninstall option will start the uninstallation process:

The below snippet verified that Python was successfully uninstalled from the system:

This way, you can uninstall Python from your windows operating system using a terminal or GUI.

Conclusion

To completely uninstall Python from windows, you can use the “del” keyword from the “CMD” terminal or the “Add or Remove” setting from the control panel. To uninstall Python using CMD, firstly, navigate to the directory where python is installed, and after that, you need to use the “del” command followed by the “python.exe”. You can uninstall Python from the control panel using the add or remove program setting. This post presented a stepwise guide for uninstalling Python from windows.

»


This article is part of in the series

Published: Wednesday 21st July 2021

Last Updated: Wednesday 29th December 2021

Every version of Python comes with bug fixes and security patches. To ensure that you’re not affected by bugs and security issues that have been fixed, removing the old version is necessary.

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

Thankfully, uninstalling Python before installing the new version fixes it, and doing it isn’t very difficult. We’ve broken down how to remove Python on every operating system in this post.

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 want to remove Python packages from your computer, you do not need to uninstall Python from your computer. You can add, remove, and search for specific Python packages using the pip tool. If you don’t know how to use pip, our detailed guide will teach you what you need to know in a matter of minutes.

How To Uninstall Python From Windows

Windows makes it easy to uninstall Python. You can remove any version of Python installed on your computer in three simple steps.

Step #1: Navigate to the Control Panel

Press the Windows key on your keyboard or press the Windows button on the bottom-left of your screen to open the Start 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

After the Control Panel opens up, you must click on the “Uninstall a program” button under the “Programs” section on the bottom left.

Windows Control Panel

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

Step #3: Uninstall Python

You must scroll down the list of programs and find the version(s) 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 wizard will launch, and after you confirm your decision to uninstall Python, it will be removed from your computer.

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 check whether Python has been removed from Path. It’s easy to do and doesn’t take long:

  1. Press the Windows key and enter “environment variables.” Launch the settings menu in the Control Panel. Windows Search Environment Variables
  2. A “System Properties” menu will appear. Find and click the “Environment Variables” button.Windows System Properties Menu
  3. Highlight the “Path” variable in the system variable section by left-clicking it. Then press the “Edit” button.Windows Environment Variables Menu
  4. If you see a path of the Python bin folder in the menu, remove it by selecting it and pressing the “Delete” button on the right side of the menu.Windows Edit Environment Variable

And with that, you will have removed Python entirely from your Windows computer.

How To Uninstall Python From Mac

Uninstalling Python on a computer 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 found in usr/bin/python.

Removing this version of Python will break 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-party Python framework on your Mac, you can uninstall it safely. Here’s how you do it:

Step #1: Remove Python from Applications

Open up Finder, and navigate to the Applications folder. Here, you will find folders of the Python version(s) you have installed. You must move them to the Trash. 

If you only want to remove a specific version of Python from your Mac, make sure you only move the relevant Python folder into the Trash.

Mac Python Folder In Applications

If a dialog box appears asking you 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” option.

Mac Delete Immediately

Deleting the folder will not remove Python from the computer completely. You must remove it from the Library directory and also remove the symbolic links.

Step #2: Remove Python from /Library

You will need to use the Terminal to remove Python from the Library directory. To open Terminal, press Cmd + Space and search for it, then launch it.

To remove the third-party frameworks from the directory, enter the following command into Terminal:

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

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

If you want to remove only a specific version of Python from your computer, specify the version by modifying the command like so:

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

Step #3: 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 computer:

#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 exist, these links will be broken. 

You can see all of the broken symlinks by entering the following command in the Terminal:

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

If you’ve only removed a specific version of Python, make sure you replace the path in the above command with the path you used in step #2.

After you see all the broken links, use these commands to delete them:

To enter the directory:

To delete the broken links:

ls -l /usr/local/bin | grep ‘../Library/Frameworks/Python.framework’ | awk ‘{print $9}’ | tr -d @ | xargs rm*

If the path in the command above is different from the path you used in step #2, replace the path in the command above with the one you used.

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

#2 Using Homebrew

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

/bin/bash -c «$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install.sh)»

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

A list of broken symlinks will appear. You can then use the following 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 Display Manager fails when Python is uninstalled from Linux.

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

To remove the version of Python you installed, use the following command on the Terminal:

sudo apt purge -y python2.x-minimal

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

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

To remove pip from the system:

sudo apt install -y python3-pip

sudo ln -s /usr/bin/pip3 /usr/bin/pip

If you find that the commands aren’t working, you may need to update your repo list using sudo apt get update.

Conclusion

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

You can now install the latest version of Python on your computer without worrying about it breaking or dealing with bugs that have already been fixed. 

To ensure you install the new Python version on your computer safely, make sure you go through our Python installation guide. If this post helped or you think we can improve this answer, let us know in the comments.

  1. Home
  2. Python Tips and Tricks
  3. Python Library Tutorials
  4. Python How To’s
  5. Python Tutorials

  • Как полностью удалить directx с компьютера windows 10
  • Как полностью удалить coreldraw с компьютера windows 10
  • Как полностью удалить avast free antivirus с компьютера windows 10
  • Как полностью удалить antimalware service executable в windows 10
  • Как полностью удалить android studio windows 10