一. pipy國(guó)內(nèi)鏡像目前有:
http://pypi.douban.com/ 豆瓣
http://pypi.hustunique.com/ 華中理工大學(xué)
http://pypi.sdutlinux.org/ 山東理工大學(xué)
http://pypi.mirrors.ustc.edu.cn/ 中國(guó)科學(xué)技術(shù)大學(xué)
http://mirrors.aliyun.com/pypi/simple/ 阿里云
https://pypi.tuna.tsinghua.edu.cn/simple/ 清華大學(xué)
二. pip源的設(shè)置和使用
1. 手動(dòng)指定安裝源 安裝某個(gè)python模塊
>pip -i http://pypi.douban.com/simple install dnspython
2. 每次都手動(dòng)指定安裝源很麻煩,可以配置pip更新源
#在當(dāng)前用戶主目錄創(chuàng)建.pip文件夾
>cd ~
>mkdir .pip
#在.pip目錄創(chuàng)建并編輯pip.conf
#pip安裝需要使用的https加密,所以在此需要添加trusted-host
[global]
trusted-host = mirrors.ustc.edu.cn
index-url = https://mirrors.ustc.edu.cn/pypi/web/simple