How to completely remove Python from a Windows machine?

Viewed 627123

I installed both Python 2.7 and Python 2.6.5. I don't know what went wrong, but nothing related to Python seems to work any more. e.g. "setup.py install" for certain packages don't recognize the "install" parameter and other odd phenomena...

I would like to completely remove Python from my system.
I tried running the 2.7 and 2.6 msi files and choosing remove Python and then running only 2.6 and reinstalling it. Still stuff don't work.

How do I completely remove Python - from everything? (!)

I would not like to reinstall my entire machine just because of the Python install...

14 Answers

you can delete it manually.

  1. open Command Prompt
  2. cd C:\Users\<you name>\AppData\Local\Microsoft\WindowsApps
  3. del python.exe
  4. del python3.exe

Now the command prompt won't be showing it anymore

where python --> yields nothing, and you are free to install another version from source / anaconda and (after adding its address to Environment Variables -> Path) you will find that very python you just installed

  1. Open CMD

  2. To show all packages installed - pip list

  3. To copy the packages name to a file - pip freeze > requirements.txt

  4. To delete all packages - pip uninstall -r requirements.txt -y

  5. Check all packages are removed - pip list

  6. Uninstall pip and other remaining packages

  7. Control panel > Uninstall > Python uninstall (from UI)

It's actually quite simple. When you installed it, you must have done it using some .exe file (I am assuming). Just run that .exe again, and then there will be options to modify Python. Just select the "Complete Uninstall" option, and the EXE will completely wipe out python for you.

Also, you might have to checkbox the "Remove Python from PATH". By default it is selected, but you may as well check it to be sure :)

Uninstall the python program using the windows GUI. Delete the containing folder e.g if it was stored in C:\python36\ make sure to delete that folder

If you still have the python installer on your PC, you can double-click on it (run it, it will open the installer window), and select the "Uninstall" option. It will uninstall that python version (if the installer is for Python3.9, then Python3.9 will be uninstalled, if it is for Python3.10, then that version...)

First, uninstall Python, then remove the pip packages you installed.

  • Uninstall Python: "Add or Remove Programs", search for Python and uninstall it.
  • Remove Pip packages: type in File Explorer %LOCALAPPDATA%\Programs\Python, and remove the folders you want.

This will clean up any pip package you installed. Otherwise, if you were to reinstall Python, you will find yourself with the same pip packages that you had.

Windows Start Menu > Settings > Apps > Apps & features > Select the app and click the Uninstall button

Related