在我的CentOS服务器上使用pip安装软件包时,出现警告和错误导致超时。

huangapple go评论68阅读模式
英文:

Installing packages with pip on my centos server times out with an warnings and error

问题

这是我得到的错误。我正在使用Python3。

pip install django

收集django
重试(重试总数=4,连接=None,读取=None,重定向=None,状态=None)后,由于连接由“ReadTimeoutError(“ HTTPSConnectionPool(host=‘pypi.python.org’,端口=443):读取超时。(读取超时=15)”,)’断开连接:/simple/django/
重试(重试总数=3,连接=None,读取=None,重定向=None,状态=None)后,由于连接由“ReadTimeoutError(“ HTTPSConnectionPool(host=‘pypi.python.org’,端口=443):读取超时。(读取超时=15)”,)’断开连接:/simple/django/
重试(重试总数=2,连接=None,读取=None,重定向=None,状态=None)后,由于连接由“ReadTimeoutError(“ HTTPSConnectionPool(host=‘pypi.python.org’,端口=443):读取超时。(读取超时=15)”,)’断开连接:/simple/django/
重试(重试总数=1,连接=None,读取=None,重定向=None,状态=None)后,由于连接由“ReadTimeoutError(“ HTTPSConnectionPool(host=‘pypi.python.org’,端口=443):读取超时。(读取超时=15)”,)’断开连接:/simple/django/
重试(重试总数=0,连接=None,读取=None,重定向=None,状态=None)后,由于连接由“ReadTimeoutError(“ HTTPSConnectionPool(host=‘pypi.python.org’,端口=443):读取超时。(读取超时=15)”,)’断开连接:/simple/django/
找不到满足要求的版本django(来自版本:)
未找到与django匹配的分发。

英文:

This is the error i get. Am using python3

pip install django
Collecting django
  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 (from versions: )
No matching distribution found for django

答案1

得分: 1

尝试使用代理服务器。
可以使用--proxy标志指定代理服务器。
<br>
像这样:
pip install --proxy your_proxy_server django

英文:

Try to use a proxy server.
you can specify your proxy server with --proxy flag.
<br>
like this:
pip install --proxy your_proxy_server django

huangapple
  • 本文由 发表于 2023年5月18日 11:43:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/76277588.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定