修复“找不到满足boto3要求的版本(来自版本:)找不到boto3的匹配发行版”

2024-05-21 02:49:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在努力安装Boto3库

  • Python版本:3.6.12
  • pip版本9.0.1
  • 服务器:Redhat 7.9(Maipo),Fedora。

我尝试了不同的合作来获得boto3库:

但我总是犯同样的错误

有什么想法吗

我的代码:

sla82716:/home/pa009999/scriptDirectory $ pip3 install boto
Collecting boto
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb0f74e10>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto/
      Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb0f74208>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto/
      Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb0f742b0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto/
      Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb0f74320>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto/
      Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb0f743c8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto/
      Could not find a version that satisfies the requirement boto (from versions: )
    No matching distribution found for boto
    sla82716:/home/pa009999/scriptDirectory $ pip3 install boto3
    Collecting boto3
      Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f08a5642f98>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
      Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f08a5642438>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
      Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f08a5642400>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
      Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f08a56420b8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
      Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f08a5642630>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
      Could not find a version that satisfies the requirement boto3 (from versions: )
    No matching distribution found for boto3
    sla82716:/home/pa009999/scriptDirectory $ pip3 install --extra-index-url https://pypi.python.org/simple boto3
    Collecting boto3
      Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5456b85358>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
      Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5456b85828>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
      Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5456b85898>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
      Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5456b85ef0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
      Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5456b85198>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/boto3/
      Could not find a version that satisfies the requirement boto3 (from versions: )
    No matching distribution found for boto3

Tags: pipnonereadbyconnectnotconnectionboto3
1条回答
网友
1楼 · 发布于 2024-05-21 02:49:59

看起来您无法解析主机名。尝试添加以下行(Google名称服务器)

nameserver 8.8.8.8

/etc/resolv.conf文件(例如,通过使用nano /etc/resolv.conf)。您只能添加三个名称服务器,因此如果文件中已有三个名称服务器,则可能必须删除/更改一行

之后,ping google.com应该起作用,而且pip install boto3也应该起作用

相关问题 更多 >