问题描述如下:
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'.
解决方案如下:
# 激活 anaconda 环境
source activate
# 退出 anaconda 环境
source deactivate
pytorch仓库的创建
#创建虚拟环境
conda create -n xxx python=3.6
#删除虚拟环境
conda remove -n your_env_name(虚拟环境名称) --all
#激活虚拟环境
conda activate your_env_name
#退出虚拟环境
conda deactivate