conda安裝的國內鏡像配置,實現快速下載

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/'
複製代碼

相關文章
相關標籤/搜索