在python中安装软件包时出错 [英] Error to install packages in python

查看:453
本文介绍了在python中安装软件包时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以尝试使用pip在python 3.6.4中安装软件包,但发现很多错误.我也尝试使用类似easy_install, pip install --upgrade --force-reinstall <package>, pip install --ignore-installed <package>的命令.错误结果始终相同:

I can try to install packages in python 3.6.4 with pip but I found many errors. I try also command like: easy_install, pip install --upgrade --force-reinstall <package>, pip install --ignore-installed <package>. The error result always the same:

 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

推荐答案

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

如果没有其他效果,请仍然尝试打开 https://pypi.python.org/simple/在浏览器中手动进行.每个主要Python软件包的每个版本都有下载链接.就我而言,该安装在Windows 10中无法从我的Visual Studio中进行,因此我手动下载了每个软件包,然后再次手动一个接一个地安装它们,例如

If nothing else works, still try to open https://pypi.python.org/simple/ manually in a browser. There are download links there for every version of every major Python package. In my case, the install didn't work in Windows 10 from my Visual Studio, so I downloaded every package manually and then installed them one-by-one manually again, something like

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

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

如果安装过程中找不到其他模块,请下载并安装缺少的模块,然后对原始模块重复该命令,以查看是否缺少其他模块,依此类推.需要一段时间,但会得到结果.

If the install says another module can't be found then download and install the missing one and repeat the command for the original one, see may be something else is missing and so forth. Takes a while but gets you the result.

这篇关于在python中安装软件包时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆