conda -V -显示版本
conda list -显示所有包
conda install xxx -安装包
conda remove xxx -卸载包
conda uninstall -卸载包
conda create --name xxx python=2 -创建名为xxx python=2 的工作环境
conda create --name xxx python=3 anaconda -具有anaconda的原生包
activaty xxx -激活环境
deactivate xxx -退出环境
conda info --envs -查看环境
conda remove --name xxx --all -删除环境
conda install --name xxx numpy -给xxx环境安装numpy包
添加国内源:
cmd输入 >
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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
# 设置搜索时显示通道地址
conda config --set show_channel_urls yes
添加完之后:
找到 .condarc 文件,删除其中的default
- windows: c:\Users\username\.condarc
或者直接在文件中写入: