修改Python的鏡像源

Mac OS下修改Python的鏡像源linux

步驟:vim

切換到家目錄bash

建立目錄 .pip 並切換到該目錄測試

建立 pip.conf 文件並寫入配置信息阿里雲

[global]

index-url = https://pypi.tuna.tsinghua.edu.cn/simple

[install]

trusted-host=pypi.tuna.tsinghua.edu.cn

以上採用的是 清華大學 的鏡像源,通過測試比較穩定url

也能夠用其餘:spa

清華:https://pypi.tuna.tsinghua.edu.cn/simplecode

阿里雲:http://mirrors.aliyun.com/pypi/simple/blog

中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/ip

華中理工大學:http://pypi.hustunique.com/

山東理工大學:http://pypi.sdutlinux.org/ 

豆瓣:http://pypi.douban.com/simple/

 

cd ~

mkdir .pip

cd .pip

touch pip.confvim pip.conf # 使用vim寫入配置信息
相關文章
相關標籤/搜索