一些常用的國內源
清華大學:https://pypi.tuna.tsinghua.edu.cn/simple 阿里雲:https://mirrors.aliyun.com/pypi/simple 中國科學技術大學 https://pypi.mirrors.ustc.edu.cn/simple 豆瓣:http://pypi.douban.com/simple
永久修改pip 國內源
在用戶根目錄(~,而非系統根目錄 / )下添加配置~/.pip/pip.conf目錄添加可信源,如果目錄文件不存在,可直接創建。
[root@localhost ~]# cd [root@localhost ~]# mkdir .pip [root@localhost ~]# cd .pip [root@localhost .pip]# vim pip.conf
pip.conf 寫入如下內容
[global] index-url=http://pypi.douban.com/simple trusted-host = pypi.douban.com
加上trusted-host防止pip報警告