欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Manjaro、pip、conda更換國內(nèi)源的方法

 更新時(shí)間:2020年11月17日 14:19:54   作者:盛夏的貓寧  
這篇文章主要介紹了Manjaro、pip、conda更換國內(nèi)源的方法,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧

Manjaro

切換鏡像源。執(zhí)行以下命令,在稍后的彈窗中選擇延遲最低的即可。

sudo pacman-mirrors -i -c China -m rank

設(shè)置archlinuxcn源。在/etc/pacman.conf中添加以下命令,中科大源和清華源添加其中一個(gè)就可以了:

[archlinuxcn]
SigLevel = Optional TrustedOnly
#中科大源
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
#清華源
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

更新源列表:

sudo pacman-mirrors -g

更新pacman數(shù)據(jù)庫并更新系統(tǒng):

sudo pacman -Syyu

更新系統(tǒng)簽名:

sudo pacman -S archlinuxcn-keyring
sudo pacman -S antergos-keyring

pip

如果只是想臨時(shí)從指定源下載某個(gè)文件,可以在下載命令后加入-i url來指定下載源,其中url是鏡像源的地址。例如:

pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple

永久更換。以添加阿里云的源為例:

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

其中的https://mirrors.aliyun.com/pypi/simple/可以換成其他的鏡像源地址。一些常見的源地址如下:

阿里云 https://mirrors.aliyun.com/pypi/simple/
中國科技大學(xué) https://pypi.mirrors.ustc.edu.cn/simple/
清華大學(xué) https://pypi.tuna.tsinghua.edu.cn/simple/

恢復(fù)到默認(rèn)的源。步驟2的命令執(zhí)行后,配置在~/.pip/pip.conf中。想要換回默認(rèn)源,只要把文件中相應(yīng)的部分刪掉舊可以了。(實(shí)在不行就把文件也刪除)

conda

以添加中科大源和清華源為例,以下兩個(gè)添加一個(gè)即可:

中科大源。在終端中執(zhí)行以下命令:

#USTC倉庫鏡像
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
#Conda 附加庫
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
#使之生效
conda config --set show_channel_urls yes

清華源:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge 
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --set show_channel_urls yes

換回默認(rèn)源:

conda config --remove-key channels

到此這篇關(guān)于Manjaro、pip、conda更換國內(nèi)源的方法的文章就介紹到這了,更多相關(guān)Manjaro、pip、conda更換國內(nèi)源內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論