我的pip -V
返回:pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
python3 -V
返回:Python 3.6.9
当我尝试使用pip安装模块时,出现以下错误:
Collecting Django==2.2.1
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/django/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/django/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/django/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/django/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)",)': /simple/django/`
>Could not find a version that satisfies the requirement Django==2.2.1 (from versions: )
>No matching distribution found for Django==2.2.1
我读过类似的问题,并检查了我是否没有代理集,并且禁用了防火墙。
我该怎么办?
答案 0 :(得分:0)
“ sudo pip install --default-timeout=100 future
”
How to solve ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443) with pip?
sudo可能是必需的,也可能不是必需的。使用sudo时要小心。