查看已有的虚拟环境
conda env list
conda info -e
创建虚拟环境
conda create -n env_name python=version
激活并进入环境
source activate env_name
conda activate env_name
删除虚拟环境
conda env remove -n env_name
查看添加的源
conda config --show-sources
遇到的问题
conda activate 激活失败
bens@bensdeMacBook-Pro ~/opt/anaconda3 conda activate TIP3.6
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
# 退出虚拟环境
conda deactivate
然后再输入激活激活命令
conda activate TIP3.6