ImportError: cannot import the name HTTPSHandler setting get-pip.py

I get this error when I try to install pip2.7. I already have python 2.7, but I'm not sure why I get this.

OS: CentOS 6.5

OpenSSL is already installed. I followed this guide to install Python 2.7: http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/

[ root@myservername arandomfolder]# python get-pip.py Traceback (most recent call last): File "get-pip.py", line 17474, in <module> main() File "get-pip.py", line 17466, in main bootstrap(tmpdir=tmpdir) File "get-pip.py", line 17406, in bootstrap import pip File "/tmp/tmpXq2wUP/pip.zip/pip/__init__.py", line 10, in <module> File "/tmp/tmpXq2wUP/pip.zip/pip/util.py", line 18, in <module> File "/tmp/tmpXq2wUP/pip.zip/pip/_vendor/distlib/version.py", line 14, in <module> File "/tmp/tmpXq2wUP/pip.zip/pip/_vendor/distlib/compat.py", line 31, in <module> ImportError: cannot import name HTTPSHandler 
+2
source share
4 answers

You have compiled Python without SSL support. Unfortunately, get-pip requires SSL support.

If you are using a Linux distribution, make sure OpenSSL is installed, including the headers when compiling Python from the source.

+4
source

So it looks like I was missing an openssl-devel dependency after I installed this, I was able to install this.

+1
source

I had this problem on a Centos 6.5 machine, although I installed openssl and openssl-devel. I also used the steps from the site: http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/

I uninstalled the python packages I installed earlier: virtualenv, NetworkX and pil:

 pip uninstall virtualenv pip uninstall NetworkX pip uninstall pil 

Then I compiled Python 2.7 and no longer had this problem. After I followed the steps in the link below, I reinstalled the above packages using pip2.7:

 pip2.7 install virtualenv pip2.7 install NetworkX pip2.7 install pil --allow-external pil --allow-unverified pil 
+1
source

I have the same problem. I decided to install it openssl-devel and reconfigure , make , make install python3 :

 yum install openssl-devel 

then go to python3 directory:

 ./configure --with-zlib --with-openssl make make install 
+1
source

Source: https://habr.com/ru/post/1207522/


All Articles