代码之家  ›  专栏  ›  技术社区  ›  jjgasse

在python中安装程序包时出错

  •  1
  • jjgasse  · 技术社区  · 6 年前

    我可以尝试用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

    2 回复  |  直到 6 年前
        1
  •  1
  •   Alex Denissov    6 年前

    认为 我没能接触到 https://pypi.python.org/simple/

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

    C: \用户\我自己(&T);“C:\Program Files(x86)\Microsoft Visual Studio\Shared\Python36\U 64\scripts\pip”安装C:\Users\My\Downloads\jupyter-1.0.0。焦油广州

    如果安装说明找不到另一个模块,则下载并安装缺失的模块,并对原始模块重复该命令,请参阅可能缺少其他模块等等。需要一段时间,但会得到结果。

        2
  •  0
  •   Hagbard    5 年前

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