项目场景:
Pycharm -> 打开Terminal Shell -> conda切换环境 ->切换失败
问题描述
完整报错信息如下
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'.
按照它说的先退出并重启shell,再执行conda init并没有什么卵用…
原因分析:
没有成功退出环境
解决方案:
在conda已经新建成功环境的前提下,通过设置直接切换环境,再新建打开Terminal即可直接切换成功环境


博客围绕Pycharm中conda环境切换失败问题展开。项目场景是在Pycharm的Terminal Shell里用conda切换环境失败,按提示退出重启shell并执行conda init无效。原因是未成功退出环境,解决方案是在已新建环境时通过设置直接切换,新建打开Terminal可成功切换。

1万+

被折叠的 条评论
为什么被折叠?



