简体   繁体   中英

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.

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 .

Run in Windows prompt:

cmd "/K" C:\ProgramData\Anaconda3\Scripts\activate.bat C:\ProgramData\Anaconda3

You will have anaconda prompt back.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM