命令提示符无法识别激活/停用conda环境命令 [英] Activate/deactivate conda environment commands aren't recognized by command prompt

查看:438
本文介绍了命令提示符无法识别激活/停用conda环境命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这个问题上发疯,并且真的很乐意提供帮助,因为我读了无数关于类似问题的文章,但是我找不到解决我特定问题的方法.我正在使用Anaconda 1.6.2和Python 2.7.13的 Windows 10 .

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.

我在conda中创建了一个要激活的新环境(称为AntennaTracking),同时停用了称为root的默认环境.当我键入"conda info --envs"时,我得到的两个环境在根目录前面都带有一个*,表明这两个环境都存在并且该根目录已激活,而Antennatracking却没有.

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.

我尝试在cmd提示符下(以及每个语法变体中使用)激活AntennaTracking"和取消激活根目录",它说激活/取消激活未被识别为内部或外部命令或可执行文件.文件.

我注意到cmd提示符正在 C:\ Users \ Antoine \ Anaconda2 \ Scripts (位于根环境中)中查找命令,即使实际的脚本文件不在其中,但在 C:\ Users \ Antoine \ Anaconda2 \ envs \ AntennaTracking \ Scripts 中(因此在新环境中).

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).

我发现很多帖子都说您必须修改系统的PATH环境变量,这是我尝试过的.我在路径中添加了 C:\ Users \ Antoine \ Anaconda2 \ envs \ AntennaTracking \ Scripts ,但cmd提示符仍在 C:\ Users \ Antoine \ Anaconda2 \中寻找激活/停用状态脚本.

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.

据我了解,只要在cmd提示知道可以找到它的情况下,实际的激活/停用脚本在何处都可以在任何环境中使用都无关紧要.甚至是真的吗?

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.

很抱歉,如果我忘记在此问题中包括一些信息.这是cmd提示错误 cmd 和我当前的PATH

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 ...)

谢谢!

推荐答案

没关系....找到了解决方案.

Nevermind.... Found the solution.

我只需要更新conda: cmd提示

I just had to update conda: cmdprompt

这篇关于命令提示符无法识别激活/停用conda环境命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆