虚拟环境配置

创建虚拟环境

1
conda create -n <Venv_Name> python=<Python_Version>

进入虚拟环境

1
conda activate <Venv_Name>

退出虚拟环境

1
conda deactivate <Venv_Name>

删除虚拟环境

1
conda remove -n <Venv_Name> --all

查看已安装包

1
conda list

安装包

1
2
3
4
5
6
# 直接安装最新版本
conda install <Package_Name>
# 指定版本安装
conda install <Package_Name>==<Version>
# 在某环境安装包
conda install -n <Venv_Name> <Package_Name>

查看当前虚拟环境

1
2
3
conda env list 
conda info -e
conda info --envs

Anaconda 常用指令

检查更新当前 conda

1
conda update conda

更新 Anaconda

1
conda update anaconda

更新所有库

1
conda update --all

更新 Python

1
conda update python

参考 & 引用

https://zhuanlan.zhihu.com/p/459607806