刚刚使用公司的centos7跑yolo,创建环境成功,想要conda activate 环境名 的时候,遇到如下错误:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- 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'.
上网搜索结果,有如下解决方法链接。
简单来说,就是你现在还没进入base环境,还不能切换到你新建的环境中,所以要先运行:
source activate
#切入到base环境,source activate可以让你进入base环境。
#然后就可以切换到其他环境
conda activate 新建的环境名称
#退出也是使用conda deactivate
如上。
原来如此原来如此。