最近我开始在一家大公司工作。我已经安装了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:\python27\lib\site-packages\pip\basecommand.py", line 211, in main
status = self.run(options, args)
File "c:\python27\lib\site-packages\pip\commands\install.py", line 294, in run
requirement_set.prepare_files(finder)
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 461, in _prepare_file
req_to_install.populate_link(finder, self.upgrade)
File "c:\python27\lib\site-packages\pip\req\req_install.py", line 250, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "c:\python27\lib\site-packages\pip\index.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:\python27\lib\site-packages\pip\utils\outdated.py", line 126, in pip_version_check
headers={"Accept": "application/json"},
File "c:\python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 477, in get
return self.request('GET', url, **kwargs)
File "c:\python27\lib\site-packages\pip\download.py", line 373, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "c:\python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "c:\python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "c:\python27\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "c:\python27\lib\site-packages\pip\_vendor\requests\adapters.py", line 431, in send
raise SSLError(e, request=request)
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
有谁能告诉我出了什么问题以及如何解决这个问题?我的工作笔记本电脑运行Windows 10。
如果有人可以提供帮助,我将非常感激。
答案 0 :(得分:0)
问题已经解决了。该公司使用代理,如果暂时关闭,我可以安装包没有问题。
我希望这能帮助处于同样情况的其他人