Conda

获取版本号

1
conda --version

更换源

更换清华源

1
2
3
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --set show_channel_urls yes

换回默认源

1
conda config --remove-key channels

环境管理

创建环境

1
conda create -n xxxx python=xxx

列举当前环境

1
2
conda info --envs
conda env list

进入环境

1
activate xxx

退出环境

1
deactivate 

复制环境

1
conda create --name new_env_name --clone old_env_name 

删除环境

1
conda remove --name your_env_name --all

包管理

列举包

1
conda list

升级包

1
conda update xxx

删除包

1
conda uninstall xxx