在 python 中安装包时出错
Error to install packages in python
我可以尝试使用 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
I think that I don't reach the 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
如果安装提示找不到另一个模块,请下载并安装缺少的模块,然后对原始模块重复命令,看看是否缺少其他模块等等。需要一段时间,但会得到结果。
在 https://pypi.org/ 上手动搜索软件包,下载相应的 .whl 文件并通过 (Anaconda) 命令行安装它们是我在 Windows 10 机器上唯一可行的方法。
我可以尝试使用 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
I think that I don't reach the 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
如果安装提示找不到另一个模块,请下载并安装缺少的模块,然后对原始模块重复命令,看看是否缺少其他模块等等。需要一段时间,但会得到结果。
在 https://pypi.org/ 上手动搜索软件包,下载相应的 .whl 文件并通过 (Anaconda) 命令行安装它们是我在 Windows 10 机器上唯一可行的方法。