码迷,mamicode.com
首页 > Web开发 > 详细

pip使用报错【cannot import name HTTPSHandler】

时间:2014-11-07 23:23:31      阅读:789      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   os   使用   sp   on   log   

python2.7,报错如下:

Traceback (most recent call last):

 File "/usr/local/bin/pip", line 9, in <module>

   load_entry_point(‘pip==1.4.1‘, ‘console_scripts‘, ‘pip‘)()

 File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 378, in load_entry_point

 File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2566, in load_entry_point

 File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2260, in load

 File "/usr/local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/__init__.py", line 10, in <module>

   from pip.util import get_installed_distributions, get_prog

 File "/usr/local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/util.py", line 17, in <module>

   from pip.vendor.distlib import version

 File "/usr/local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/vendor/distlib/version.py", line 13, in <module>

   from .compat import string_types

 File "/usr/local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/vendor/distlib/compat.py", line 31, in <module>

   from urllib2 import (Request, urlopen, URLError, HTTPError,

ImportError: cannot import name HTTPSHandle

 

处理:yum安装openssl和openssl-devel。然后重新编译python。

 

参考:

http://daiqingyang.blog.51cto.com/1070509/1275432

pip使用报错【cannot import name HTTPSHandler】

标签:style   blog   http   io   os   使用   sp   on   log   

原文地址:http://www.cnblogs.com/xiaotengyi/p/4082471.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!