2015-08-17 7 views
9

Hallo Ich versuche, pip mit Python 2.7.9 installieren, aber immer folgenden Fehler erhalten. Ich möchte Python virtual env erstellen.HTTPSHandler Fehler bei der Installation von Pip mit Python 2.7.9

python get-pip.py 

     Traceback (most recent call last): 
      File "get-pip.py", line 17767, in <module> 
      main() 
      File "get-pip.py", line 162, in main 
      bootstrap(tmpdir=tmpdir) 
      File "get-pip.py", line 82, in bootstrap 
      import pip 
      File "/tmp/tmp_Tfw2V/pip.zip/pip/__init__.py", line 15, in <module> 
      File "/tmp/tmp_Tfw2V/pip.zip/pip/vcs/subversion.py", line 9, in <module> 
      File "/tmp/tmp_Tfw2V/pip.zip/pip/index.py", line 30, in <module> 
      File "/tmp/tmp_Tfw2V/pip.zip/pip/wheel.py", line 35, in <module> 
      File "/tmp/tmp_Tfw2V/pip.zip/pip/_vendor/distlib/scripts.py", line 14, in <module> 
      File "/tmp/tmp_Tfw2V/pip.zip/pip/_vendor/distlib/compat.py", line 31, in <module> 

    ImportError: cannot import name HTTPSHandler 

Ich denke, das ist etwas mit openssl Bibliotheken verwandt. Da ich keinen Sudo-Zugang habe, möchte ich es im Home-Ordner von der Quelle installieren. Irgendeine Idee, wie es geht?

Antwort

11

Vergewissern Sie sich, openssl und openssl-devel installiert ist, bevor Sie Python bauen 2,7

yum install openssl openssl-devel 

oder

apt-get install openssl openssl-devel 

oder (für Debian):

apt-get install libssl-dev 

Um Python wieder aufbauen

cd ~ 
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz 
tar xzf Python-2.7.9.tgz 
cd Python-2.7.9 
./configure 
make install 

Dann sollte die python get-pip.py funktionieren.

0

Installieren von openssl098e behoben das Problem für mich.

Verwandte Themen