完整教程:https://zh-v2.d2l.ai/chapter_installation/index.html
Cmd中conda 命令不识别
解决办法:
在系统变量中添加路径配置
Miniconda安装路径D:\ProgramData\Miniconda3
新增系统变量:ANACONDA_HOME,变量值D:\ProgramData\Miniconda3
系统变量path中添加
%ANACONDA_HOME%\Scripts
%ANACONDA_HOME%\Library\bin
%ANACONDA_HOME%
Cmd中conda activate d2l命令报错
报错信息如下
C:\Users**>conda activate d2l
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
● bash
● cmd.exe
● fish
● tcsh
● xonsh
● zsh
● powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
错误翻译:
CommandNotFoundError:您的shell未正确配置为使用“conda activate”。
如果从批处理脚本中使用“conda activate”,
请更改 调用“CALL conda.bat activate”。
问题:
- 可能conda环境安装有问题
- 没有在conda的环境下去使用“conda activate”这个命令,所以才命令找不到然后无效。
没有在shell环境下应该要先启动conda的base环境。
解决办法:
命令:
activate
在cmd中再次执行
conda.bat activate
conda activate d21
最后查看环境