一些国内的pip源,如下:
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
直接在user目录中创建一个pip目录,如:C:\Users\01379832\pip目录下,新建文件pip.ini,内容如下:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
如上图所述: 从阿里云的pip源下载requests模块,速度高达1.4MB/s。避免一些错误,加快了开发时间。
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/queuelib/