为什么Anaconda无法识别conda命令? [英] Why Anaconda does not recognize conda command?
问题描述
我安装了最新版本的Anaconda. 现在,我要在其中安装OpenCV.当我键入:
I installed the latest version of Anaconda. Now I want to install OpenCV within it. When I type:
conda install -c https://conda.binstar.org/anaconda opencv
我收到此消息错误:" conda无法识别为内部命令... "(对不起,由于我的操作系统是法语,因此我尝试从法语翻译)
I get this message error: "conda is not recognized as internal command ..." (sorry, I try to translate from French because my OS is in French)
问题是Anaconda附带了conda,所以我想知道为什么启动Anaconda并键入上面的命令不起作用?
The problem is that conda comes with Anaconda, so I wonder why lauching Anaconda and type the above command does not work ?
推荐答案
对于Windows
转到Control Panel\System and Security\System\Advanced System Settings
,然后查找Environment Variables
.
您的用户变量应包含Path=Path\to\Anaconda3\Scripts
.
您需要确定Anaconda3
文件夹的位置(即该文件夹的路径).我的在C:\Users
.
You need to figure where your Anaconda3
folder is (i.e. the path to this folder) . Mine was in C:\Users
.
您需要将conda
添加到PATH
.为此,请输入:
You need to add conda
to PATH
. To do so, type:
export PATH=/path/to/anaconda3/bin:$PATH
.
同样,您需要确定anaconda3
文件夹的路径(通常,该路径存储在$HOME
中)
Same thing, you need to figure the path to anaconda3
folder (Usually, the path is stored in $HOME
)
如果不想在每次启动会话时都执行此操作,还可以在.bashrc
文件中将conda
添加到PATH
:
If you don't want to do this everytime you start a session, you can also add conda
to PATH
in your .bashrc
file:
echo 'export PATH=/path/to/anaconda3/bin:$PATH' >> ~/.bashrc
这篇关于为什么Anaconda无法识别conda命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!