在 Windows 10 上无法识别 Conda 命令
问题描述
我按照此处的说明在 Windows 10 上安装了 Anaconda 4.4.0(Python 3.6 版本):https://www.continuum.io/downloads.但是,当我打开命令提示符窗口并尝试编写时
I installed Anaconda 4.4.0 (Python 3.6 version) on Windows 10 by following the instructions here: https://www.continuum.io/downloads. However, when I open the Command prompt window and try to write
conda list
我明白了
'conda' 命令无法识别...
'conda' command is not recognized...
错误.
我试着跑了
set PATH=%PATH%;C:UsersAlexAnaconda3
但这没有帮助.我还读到我可能需要编辑我的 .bashrc
文件,但我不知道如何访问这个文件,以及我应该如何编辑它.
but it didn't help. I also read that I might need to edit my .bashrc
file, but I don't know how to access this file, and how I should edit it.
解决方案
在 Windows 中,您必须将路径设置为安装 Anaconda3 的位置.
In Windows, you will have to set the path to the location where you installed Anaconda3 to.
对我来说,我将 anaconda3 安装到 C:Anaconda3
中.因此,您需要将 C:Anaconda3
以及 C:Anaconda3Scripts
添加到路径变量中,例如设置 PATH=%PATH%;C:Anaconda3;C:Anaconda3Scripts
.
For me, I installed anaconda3 into C:Anaconda3
. Therefore you need to add C:Anaconda3
as well as C:Anaconda3Scripts
to your path variable, e.g. set PATH=%PATH%;C:Anaconda3;C:Anaconda3Scripts
.
您可以通过 powershell 执行此操作(见上文,https://msdn.microsoft.com/en-us/library/windows/desktop/bb776899(v=vs.85).aspx ),或点击 windows
键 → 输入 environment
→ 从 settings
中选择 → edit environment variables for your account
→ 选择 Path
变量 →编辑
→ 新建
.
You can do this via powershell (see above, https://msdn.microsoft.com/en-us/library/windows/desktop/bb776899(v=vs.85).aspx ), or hit the windows
key → enter environment
→ choose from settings
→ edit environment variables for your account
→ select Path
variable → Edit
→ New
.
要测试它,打开一个新的 dos shell,你现在应该可以使用 conda 命令了.例如,尝试 conda --version
.
To test it, open a new dos shell, and you should be able to use conda commands now. E.g., try conda --version
.
相关文章