在linux系统中,安装了anaconda,配置了conda环境变量,也使用conda命令创建了新的环境my_env,但在使用conda激活时,报错。
报错问题
输入:
conda activate my_env
报错:

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’.
解决方法
在终端执行以下两条命令:
source activate
source deactivate
在Linux系统中安装Anaconda后,遇到环境变量配置和环境激活的问题。错误提示表明shell未正确配置conda命令。解决方法是运行`conda init <SHELL_NAME>`初始化shell,可能需要关闭并重启shell。另外,尝试使用`source activate`和`source deactivate`命令来激活和退出环境。
4886

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



