Windows上的Pip无法安装任何程序

时间:2019-07-01 16:56:54

标签: python-3.x windows pip

我正在尝试在Windows 10计算机上使用numpy和openCV设置获取Python 3.6。我在pip 18.1中安装了python 3.6.8。当我尝试使用pip安装任何东西时,无论使用哪种软件包,都得到相同的结果:

C:\WINDOWS\system32>pip install numpy
Collecting numpy
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D135A3AE48>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/numpy/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D135A3ABE0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/numpy/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D135A3A8D0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/numpy/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D135A3A7B8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/numpy/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D135A3A9B0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/numpy/
  Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy

我尝试更新pip,它告诉我它已经是最新的了。发生了什么事?

3 个答案:

答案 0 :(得分:0)

我知道了。这是我公司网络上的代理问题。在pip安装numpy后使用--proxy工作。

答案 1 :(得分:-1)

请尝试使用此代码

image={}

答案 2 :(得分:-1)

尝试此代码。这会将pypi.org和files.pythonhosted.org设置为可信主机,以忽略SSL错误。 pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org

此问题的答案:pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)"