1

I used Conda on Windows and tried and set an environment variable using the command

conda env config vars set value=x

I used this command incorrectly resulting in a behaviour documented here:

How to clear the conda environment variables?

This broke my Conda completely and I could no longer activate or deactivate environments.

I then decided on the smart idea to just start with a fresh install of conda.

I ran the windows uninstaller and received the following error message.

enter image description here

On reinstalling miniconda or anaconda I get no error messages but basically I cannot use conda in powershell or cmd. I also cannot open the anaconda command terminal. when opening it just closes immediately with no error message.

Any help on how to fix this would be greatly appreciated I now understand I didn't really know what adding an environment variable did. Is it possible this variable is saved somewhere else and is stopping anaconda from working properly?

thank you

  • If you're reinstalling, be sure to delete everything Anaconda installs. List can be found [in this answer](https://stackoverflow.com/a/59184796/570918). – merv Jul 06 '22 at 17:21
  • Actually, if activation is an issue, then maybe try `conda init --reverse` once you've reinstalled. I don't know how it works with Windows shells, but on Unix the `conda init` command edits user-level files that are associated with the shell and thus need to be cleaned up. – merv Jul 06 '22 at 17:39
  • OK. The issue seems to be much larger. I am unable to open windows command prompt. This causes large issues with the windows operating system including installing programs. I made a clean install of windows. This fixed the issue but I have no idea how setting an env variable with conda can end up breaking the command prompt. – Mark Zurbrügg Jul 06 '22 at 18:57
  • 1
    If you set the environment variable for an auto-activated environment (e.g., **base**), then the `cmd.exe` could error out while starting up. Again, I am not familiar with what `conda init` edits to get `cmd.exe` to use Conda, but you likely just needed to edit that file rather than reinstall OS. – merv Jul 07 '22 at 00:25

0 Answers0