当使用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'
在执行'conda init'也没有作用时,可以尝试如下方法:
source ~/anaconda3/etc/profile.d/conda.sh
conda activate my_env
有时可能需要查看anaconda的安装路径:
conda info | grep -i 'base environment'
参考链接:stackoverflow
标签:CommandNotFoundError,use,shell,configured,init,activate,conda From: https://www.cnblogs.com/hetailang/p/18132707