python pip安装返回SSL错误



最近我开始在一家大公司工作。我已经安装了python,现在正试图安装软件包(使用已安装的pip),但出现以下错误(numpy是一个示例,但每个软件包都会出现此错误):

> pip install numpy
Collecting numpy
  Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy

因为我认为我之所以会出错,是因为我在一个公司网络中,所以我尝试了以下操作(因为StackOverflow上的其他人也这么做了):

> pip -vvv install numpy
Collecting numpy
  Getting page https://pypi.python.org/simple/numpy/
  Starting new HTTPS connection (1): pypi.python.org
  Could not fetch URL https://pypi.python.org/simple/numpy/: connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) - skipping
  1 location(s) to search for versions of numpy:
  * https://pypi.python.org/simple/numpy/
  Getting page https://pypi.python.org/simple/numpy/
  Starting new HTTPS connection (2): pypi.python.org
  Could not fetch URL https://pypi.python.org/simple/numpy/: connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) - skipping
  Could not find a version that satisfies the requirement numpy (from versions: )
Cleaning up...
No matching distribution found for numpy
Exception information:
Traceback (most recent call last):
  File "c:python27libsite-packagespipbasecommand.py", line 211, in main
    status = self.run(options, args)
  File "c:python27libsite-packagespipcommandsinstall.py", line 294, in run
    requirement_set.prepare_files(finder)
  File "c:python27libsite-packagespipreqreq_set.py", line 334, in prepare_files
    functools.partial(self._prepare_file, finder))
  File "c:python27libsite-packagespipreqreq_set.py", line 321, in _walk_req_to_install
    more_reqs = handler(req_to_install)
  File "c:python27libsite-packagespipreqreq_set.py", line 461, in _prepare_file
    req_to_install.populate_link(finder, self.upgrade)
  File "c:python27libsite-packagespipreqreq_install.py", line 250, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "c:python27libsite-packagespipindex.py", line 571, in find_requirement
    'No matching distribution found for %s' % req
DistributionNotFound: No matching distribution found for numpy
Starting new HTTPS connection (1): pypi.python.org
There was an error checking the latest version of pip
Traceback (most recent call last):
  File "c:python27libsite-packagespiputilsoutdated.py", line 126, in pip_version_check
    headers={"Accept": "application/json"},
  File "c:python27libsite-packagespip_vendorrequestssessions.py", line 477, in get
    return self.request('GET', url, **kwargs)
  File "c:python27libsite-packagespipdownload.py", line 373, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "c:python27libsite-packagespip_vendorrequestssessions.py", line 465, in request
    resp = self.send(prep, **send_kwargs)
  File "c:python27libsite-packagespip_vendorrequestssessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "c:python27libsite-packagespip_vendorcachecontroladapter.py", line 46, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "c:python27libsite-packagespip_vendorrequestsadapters.py", line 431, in send
    raise SSLError(e, request=request)
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

有人能告诉我出了什么问题,我该怎么解决吗?我的工作笔记本电脑运行windows 10。

如果有人能帮忙,我将不胜感激。

问题已经解决。该公司使用代理,如果暂时关闭,我可以毫无问题地安装软件包。

我希望这能帮助其他处于相同情况的人

相关内容

  • 没有找到相关文章

最新更新