Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to uninstall Python and all packages

I wish to uninstall Python 2.7 and all packages connected to it. I initially installed Python from the official website and I installed all packages using the pip install command. Would uninstalling Python from the control panel also uninstall all packages automatically?

The reason I want to uninstall Python is because I want to use Anaconda in order to be able to manage packages more easily and also be able to install both Python 2 and 3 to switch between them back and forth.

like image 610
Senyokbalgul Avatar asked Feb 19 '17 06:02

Senyokbalgul


People also ask

Does uninstalling Python remove all packages Windows?

@patelshahrukh uninstalling python DOES NOT remove pip packages. please AVOID doing that, since it both most likely WON'T WORK the way you think it will, and, depending on how you install python again, can leave your machine in an unstable state that's more work to fix.

How do I uninstall Python from command line?

First of all open your Command Prompt. Then run this cd C:\Users\<you name>\AppData\Local\Microsoft\WindowsApps Then del python.exe Then del python3.exe After of this steps you will find completely uninstalled python.


1 Answers

If you uninstall from the control panel, it should remove all packages with it. To ensure that your path doesn't contain your old python when you try and use anaconda, you should remove Python from your path. In windows 10:

  1. From desktop go bottom left and find the menu.
  2. Click system, then Advanced System Settings
  3. In this window, go to the Advanced tab and click on the environment variables button.
  4. From there you can edit your Path, with the edit button.
  5. Make sure there is no reference to Python here. Also, all variables are separated by a ; so make sure all syntax is good before saving.
  6. Install anaconda and at the end of the install it should ask if you want to make it the default Python. Say yes and every time you or another program asks for Python, it will get pointed to anaconda.
like image 183
Nick H Avatar answered Oct 03 '22 02:10

Nick H