問題描述
我安裝了最新版本的 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)
問題是 conda 自帶 Anaconda,所以我想知道為什么啟動 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 PanelSystem and SecuritySystemAdvanced System Settings
然后查找 Environment Variables
.
您的用戶變量應包含 Path=Path oAnaconda3Scripts
.
Your user variables should contain Path=Path oAnaconda3Scripts
.
你需要弄清楚你的 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:
導出 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 命令?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!