尝试在pycharm上安装python包时出现此错误:
Install packages failed: Error occurred when installing package tornado
我不知道它是为了什么。这是详细信息:
Install packages failed: Error occurred when installing package tornado.
The following command was executed:
packaging_tool.py install --build-dir C:\Users\ehsan\AppData\Local\Temp\pycharm-packaging7844946454948740003.tmp tornado
The error output of the command:
Downloading/unpacking tornado
Cleaning up...
Exception:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\basecommand.py", line 134, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\commands\install.py", line 236, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\req.py", line 1085, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\index.py", line 201, in find_requirement
page = self._get_page(main_index_url, req)
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\index.py", line 554, in _get_page
return HTMLPage.get_page(link, req, cache=self.cache)
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\index.py", line 671, in get_page
resp = urlopen(url)
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\download.py", line 176, in __call__
response = self.get_opener(scheme=scheme).open(url)
File "C:\Python27\lib\urllib2.py", line 404, in open
response = self._open(req, data)
File "C:\Python27\lib\urllib2.py", line 422, in _open
'_open', req)
File "C:\Python27\lib\urllib2.py", line 382, in _call_chain
result = func(*args)
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\download.py", line 155, in https_open
return self.do_open(self.specialized_conn_class, req)
File "C:\Python27\lib\urllib2.py", line 1181, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "C:\Python27\lib\httplib.py", line 995, in request
self._send_request(method, url, body, headers)
File "C:\Python27\lib\httplib.py", line 1029, in _send_request
self.endheaders(body)
File "C:\Python27\lib\httplib.py", line 991, in endheaders
self._send_output(message_body)
File "C:\Python27\lib\httplib.py", line 844, in _send_output
self.send(msg)
File "C:\Python27\lib\httplib.py", line 806, in send
self.connect()
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\download.py", line 139, in connect
match_hostname(self.sock.getpeercert(), self.host)
File "C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\backwardcompat\ssl_match_hostname.py", line 61, in match_hostname
% (hostname, ', '.join(map(repr, dnsnames))))
CertificateError: hostname '127.0.0.1' doesn't match either of '*.c.ssl.fastly.net', 'c.ssl.fastly.net', '*.target.com', '*.vhx.tv', '*.snappytv.com', '*.atlassian.net', 'secure.lessthan3.com', '*.atlassian.com', 'a.sellpoint.net', 'cdn.upthere.com', '*.tissuu.com', '*.issuu.com', '*.kekofan.com', '*.python.org', '*.theverge.com', '*.sbnation.com', '*.polygon.com', '*.twobrightlights.com', '*.2brightlights.info', '*.vox.com', 'staging-cdn.upthere.com', '*.zeebox.com', '*.beamly.com', '*.aticpan.org', 'stream.svc.7digital.net', 'stream-test.svc.7digital.net', '*.articulate.com', 's.t.st', 'vid.thestreet.com', '*.planet-labs.com', '*.url2png.com', 'turn.com', 'www.turn.com', 'rivergathering.org', 'social.icfglobal2014-europe.org', '*.innogamescdn.com', '*.pathable.com', '*.staging.pathable.com', '*.kickstarter.com', 'sparkingchange.org', 'www.swedavia.se', 'www.swedavia.com', 'js-agent.newrelic.com', '*.fastly-streams.com', 'cdn.brandisty.com', 'fastly.hightailcdn.com', '*.fl.yelpcdn.com', '*.feedmagnet.com', 'api.contentbody.com', '*.acquia.com', '*.swarmapp.com', '*.pypa.io', 'pypa.io', 'static.qbranch.se', '*.krxd.net', '*.room.co', '*.metrological.com', 'room.co', 'cdn.evbuc.com', 'cdn.adagility.com', '*.bandpage.com', '*.ibmserviceengage.com', '*.quirky.com', '*.veez.co', '*.x.io', '*.otoycdn.net', '*.scribd.com', 'www.dwin1.com', 'api.imgur-ysports.com', 'i.imgur-ysports.com', '*.fxcm.co.jp', 'listora.com', '*.listora.com', 'blendle.nl', '*.blendle.nl', '*.modeanalytics.com', 'modeanalytics.com', 'krux.com', '*.krux.com', '*.udemy.com', '*.1stdibs.com', 'api.keep.com', 'www.piriform.com', '*.ustream.tv', 'www.zimbio.com', 'm.zimbio.com', 'www.stylebistro.com', 'm.stylebistro.com', 'm.lonny.com', 'www.lonny.com', 'assets.trabiancdn.com', '*.socialchorus.com', '*.heritagestatic.com', '*.theoutbound.com', 'img.rakuten.com', 'images.rakuten.com', 'img1.r10.io', 'ast1.r10.io', 'scribd.com'
Storing complete log in C:\Users\ehsan\pip\pip.log
所有python软件包都会发生此错误,而不仅仅是龙卷风。好像我必须用pip install或python安装工具做一些事情。我在Windows上使用pycharm 3.4。你有什么想法如何处理这个?
答案 0 :(得分:1)
转到文件 - >设置 - > HTTP代理