繁体   English   中英

linux服务器pip不安装模块

[英]linux server pip does not install modules

我的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

我阅读了类似的问题,并检查了我没有设置代理,并且我的防火墙已禁用。

我该怎么办?

sudo pip install --default-timeout=100 future

如何使用 pip 解决 ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443)?

sudo 可能是必要的,也可能不是。 使用 sudo 时要小心。

另: 使用 Pip3 安装的问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM