https://pypi.tuna.tsinghua.edu.cn/simple/
问题:
C:\Users\肖俊>python -m pip install –upgrade pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=’pypi.org’, port=443): Read timed out. (read timeout=15)”)’: /simple/pip/
解决:
包安装
pip install requests lxml -i http://pypi.douban.com/simple –trusted-host pypi.douban.com
永久解决:
win10环境下如何修改Python pip的更新源?
1、在window的文件夹窗口输入 : %APPDATA%
2、在弹出的路径中新建pip文件夹,然后到pip文件夹里面去新建个pip.ini文件,然后再里面输入内容
[global]
timeout = 6000
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com