anaconda的全部的软件包所有在国外,安装起来很麻烦,关键是下载速度慢,并且常常中断,因此须要配置国内安装的镜像,下载速度就很快了。阿里云
1、conda换国内源spa
1.1 查看源code
命令cdn
conda config --show-sourcesrem
显示结果it
==> /home/xxx/.condarc <==
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- defaults
复制代码
这里有两个源,一个是清华的源,另外一个是默认的源io
1.2 添加源(这里以添加清华源为例,固然也能够选择其余的源)class
命令软件
conda config --add channels配置
操做:
#添加清华的源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
复制代码
运行成果后,使用显示源查看是否添加成功(conda config --show-sources)
1.3 其余可选的源(还有更多的能够网上搜索,这里不一一列举)
中科大的源
conda config –add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
阿里云的源
conda config --add channels http://mirrors.aliyun.com/pypi/simple/
复制代码
1.4 移除源
命令
conda config --remove channels
操做
conda config --remove channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'
复制代码