修改pip源

Windows:

在C:UsersxxxAppDataLocalpip 下新建文件pip.ini,填入一下内容

[global]

trusted-host = pypi.douban.com

index-url = http://pypi.douban.com/simple

Ubuntu:

进入~/.pip目录,创建pip.conf文件,填入一下内容

[global]

trusted-host = pypi.douban.com

index-url = http://pypi.douban.com/simple

命令:

pip install web.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

原文地址:https://www.cnblogs.com/myprovencesky/p/5780173.html