Delete python environment

Viewed 16162

Python newbie here. I am on windows. I installed anaconda a while back for my own user account (not for all users on windows). It installed into c:\users...\local..anaconda and all is good. I might have recently updated anaconda and installed VS 2017.

Now I seem to have 4 python environments.

I tried uninstalling from add-remove programs but some how the environments did not go away.

My questions: 1. Where does Visual Studio get the list of environment names? 2. How do I delete these environments? I just want to keep one and delete all the others

4 Answers

I deleted the unwanted registry keys from (what solved the problem for me):

HKEY_CURRENT_USER\Software\Python\PythonCore\

The source mentions also the following keys, but they did not exist in my computer:

HKEY_LOCAL_MACHINE\Software\Python\PythonCore\  
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore\

Source: https://github.com/Microsoft/PTVS/issues/18

to Question 1:

Visual Studio searches the registry to detect global installed python environments by following PEP 514 as described in Install Python interpreters.

to Question 2:

Open the Visual Studio Installer again and change the current installation by selecting only the python interpreters you need (you will find they in the Components tab).

Related