Python 安装程序包失败:安装程序包tornado时出错

Python 安装程序包失败:安装程序包tornado时出错,python,pycharm,Python,Pycharm,尝试在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

尝试在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包中,而不仅仅是tornado。似乎我必须使用pip安装或python安装工具来做一些事情。我正在windows上使用pycharm 3.4。您知道如何处理此问题吗?

转到文件->设置->HTTP代理

  • 检查“手动代理配置”和HTTP
  • 将“主机名:”设置为代理的名称 (例:你可能会得到 从浏览器设置中选择代理的名称。)
  • 设置“端口号:”(例如:8080)

您是否支持代理?