Activate/deactivate conda environment commands aren't recognized by command prompt

℡╲_俬逩灬. 提交于 2019-12-12 05:19:45

问题


I am going crazy over this issue and would really love some help, as I read countless posts on similar issues but I found no solution to my particular problem. I am on Windows 10 with Anaconda 1.6.2 and Python 2.7.13.

I created a new environment in conda (called AntennaTracking) that I want to activate, while deactivating the default environment called root. When I type "conda info --envs" I get both the environments with a * in front of root, showing that both exist and that root is activated and Antennatracking is not.

I tried using "activate AntennaTracking" and "deactivate root" in a cmd prompt (and every syntax variation...) and it says that activate/deactivate is not recognized as an internal or external command or an executable file.

I noticed that the cmd prompt is looking for the command in C:\Users\Antoine\Anaconda2\Scripts (which is in the root environment) eventhough the actual script files are not in it, but in C:\Users\Antoine\Anaconda2\envs\AntennaTracking\Scripts (so in the new environment).

I found plenty of posts saying that you have to modify the PATH environment variables of the system, which I have tried. I added C:\Users\Antoine\Anaconda2\envs\AntennaTracking\Scripts to the PATH, but the cmd prompt still looks for activate/deactivate in C:\Users\Antoine\Anaconda2\Scripts.

From what I understand, it doesn't matter where the actual activate/deactivate script is located for it to be used on any environment, as long as the cmd prompt knows to find it. Is that even true?

In any case, I am open for every suggestion you might have and help is greatly appreciated. I have tried too many things to keep track of them all, so shoot.

I am sorry if I am forgetting to include some information in this question. Here are screenshots of the cmd prompt error cmd and my current PATH PATH (sorry for the French ...)

Thank you!


回答1:


Nevermind.... Found the solution.

I just had to update conda: cmdprompt



来源:https://stackoverflow.com/questions/44845026/activate-deactivate-conda-environment-commands-arent-recognized-by-command-prom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!