Search code examples
pythonanacondacondaminiconda

conda not recognized in Anaconda Prompt after deactivating environment


Not sure if this is a bug, but if anyone has a suspected way to fix this issue, I would be eternally grateful.

Description

After activating an environment in the Anaconda Prompt, when I deactivate I seem to lose all conda-related information. In other words, it returns me to a normal Windows command prompt. (No Python, no conda commands, etc.) This is rather annoying because it means I need to open another Anaconda Prompt and navigate back to the folder where I was working.

Steps to reproduce:

  1. Create a python environment with Anaconda Prompt
  2. Activate it
  3. Deactivate it
  4. Try conda list

I just had 30 new users install Anaconda with Python 3.6 earlier this week, all on Windows, and they all experienced this issue. I have Miniconda, they have Anaconda.

Config info

platform : win-64
conda version : 4.3.25
python version : 3.6.1.final.0

EDIT: forgot to mention that I submitted a bug report just in case this was a bug. No responses at the moment.


Solution

  • Turns out, my understanding of deactivate was wrong -- it's purpose is to completely deactivate conda and remove all traces from the terminal. So this behavior is what deactivate is actually meant to do, not switch you to your root environment.

    See the issue response here: link.