python2.7安装pip遇到ImportError: cannot import name HTTPSHandle

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。

时间: 2024-07-28 21:56:19

python2.7安装pip遇到ImportError: cannot import name HTTPSHandle的相关文章

pip install ImportError: cannot import name &#39;SourceDistribution&#39;

问题原因: pip v20.0的bug解决办法:手动升级pip curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py Then run the following command in the folder where you have downloaded get-pip.py: python get-pip.py pip install ImportError: cannot import name 'SourceDistributi

linux升级python2.7,安装pip,setuptools,zlib

1,在192.168.0.65装python2.7和PIP     #ssh 192.168.0.65         升级到python2.7     #cd /usr/local     #wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz         # tar zxvf Python-2.7.10.tgz     # cd Python-2.7.10     # mkdir /usr/local/Python

Linux下python2.7安装pip

首先下载并安装setuptools: wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py sudo python ez_setup.py --insecure 再到python官网下载pip安装包,解压到某个位置,我这里下载的是8.0.0版本,然后就可以安装了: wget https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893f

更新centos python2.7 安装pip

参考: http://www.linuxidc.com/Linux/2013-06/85968.htm http://my.oschina.net/vaero/blog/210486

python2.7安装pip

原文地址:https://www.cnblogs.com/andrew-address/p/12688710.html

centos6.5更新python2.7影响pip和easy_install

一般更新python的时候只知道会影响yum,但没注意会影响pip和easy_install,需要卸载安装 安装依赖环境 yum install zlib-devel zlib openssl openssl-devel readline-devel (zlib安装setuptools的时候会用到,没有的会报"RuntimeError: Compression requires the (missing) zlib module":openssl是pip会用到,没有会报ImportEr

Centos——升级Python2.7及安装pip

CentOS升级Python2.7及安装pip 1) 升级Python2.7 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 python -V  # 查看版本:Python 2.6.6 mkdir -p ~/Env/python; cd ~/Env/python  # 创建个目录 wget --no-check-certificate https://www.pyt

CentOS升级Python2.7及安装pip

body { font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI",Tahoma,Helvetica,Sans-Serif,"Microsoft YaHei", Georgia,Helvetica,Arial,sans-serif,宋体, PMingLiU,serif; font-size: 10.5pt; line-height: 1.5;

CentOS6.5上安装Python2.7和PIP

目前大部分用户使用的CentOS6.5上默认的Python还是2.6版本.升级到Python2.7碰到很多问题.本文将介绍如何安装Python2.7. 1. 安装必要的准备包 安装过程将用到gcc,方便起见,安装"Development Tools" yum groupinstall "Development tools" 另外,Python安装中需要的一些依赖包 yum install zlib-devel bzip2-devel openssl-devel nc