问题描述
- 在 Ubuntu 下使用 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'.
![](https://i-blog.csdnimg.cn/blog_migrate/54f918bb28192c94b5cf0fd97871f3de.png)
解决方法
- 首次使用 conda 虚拟环境时,先使用 source 代替 conda 打头激活虚拟环境
source activate 虚拟环境名称