【问题标题】:Error to install packages in python在 python 中安装包时出错
【发布时间】:2018-08-17 23:18:22
【问题描述】:

我可以尝试使用 pip 在 python 3.6.4 中安装软件包,但我发现了很多错误。我也尝试像这样的命令:easy_install, pip install --upgrade --force-reinstall <package>, pip install --ignore-installed <package>。错误结果总是一样的:

 Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000002E91DCF04E0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/<package>/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000002E91DCF0BE0>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/<package>/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000002E91DCF0748>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/<package>/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000002E91DCF0C18>: Failed to establish a new connection: [Errno 11002] getaddrinfo failed',)': /simple/<package>/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000002E91DCF02E8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/<package>/

我认为我没有到达https://pypi.python.org/simple

【问题讨论】:

标签: python-3.x installation packages


【解决方案1】:

认为我没有到达https://pypi.python.org/simple/

如果没有其他方法,仍然尝试在浏览器中手动打开https://pypi.python.org/simple/。每个主要 Python 包的每个版本都有下载链接。在我的情况下,安装在我的 Visual Studio 中的 Windows 10 中不起作用,所以我手动下载了每个包,然后再次手动安装它们,类似于

C:\Users\myself>"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\scripts\pip" 安装 C:\Users\myself\Downloads\jupyter-1.0.0.tar。 gz

如果安装显示找不到另一个模块,则下载并安装缺少的模块,然后对原始模块重复该命令,看看可能缺少其他模块等等。需要一段时间,但可以得到结果。

【讨论】:

    【解决方案2】:

    https://pypi.org/ 上手动搜索软件包,下载相应的 .whl 文件并通过 (Anaconda) 命令行安装它们是我在 Windows 10 机器上唯一可行的方法。

    【讨论】:

      猜你喜欢
      • 2023-02-26
      • 2013-08-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多