最近Ubuntu下面使用conda activate name激活虚拟命令的时候,突然报错,信息如下:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init
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'.
看到这个处于一脸懵逼的状态,几经探索,解决方法如下:
1 首先终端输入 source activate
2 然后终端输入 source deactivate
3 输入你要激活的虚拟环境指令 conda activate your_virtual_name
问题解决!!!