Why Anaconda does not recognize conda command?(为什么 Anaconda 不识别 conda 命令?)
问题描述
我安装了最新版本的 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 命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为什么 Anaconda 不识别 conda 命令?
基础教程推荐
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
