问题描述
- 在 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- powershellSee 'conda init --help' for more information and options.IMPORTANT: You may need to close and restart your shell after running 'conda init'.
解决方法
- 首次使用 conda 虚拟环境时,先使用 source 代替 conda 打头激活虚拟环境
source activate 虚拟环境名称