首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Fix“无法找到满足boto3需求的版本(来自版本:)没有为boto3找到匹配的发行版”

Fix“无法找到满足boto3需求的版本(来自版本:)没有为boto3找到匹配的发行版”
EN

Stack Overflow用户
提问于 2021-08-31 15:55:28
回答 1查看 1.3K关注 0票数 1

我很难安装Boto3库。

  • Python版本: 3.6.12
  • pip版本9.0.1
  • Server: Redhat 7.9 (Maipo),Fedora.

我尝试了不同的方法来获得boto3库:

但我总是犯同样的错误。

有什么想法吗?

我的代码:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-08-31 16:17:26

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

代码语言:javascript
复制
nameserver 8.8.8.8

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

之后,ping google.compip install boto3也应该工作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69001856

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档