pfc
pfc

Reputation: 1910

Cannot install pip from get-pip.py

I'm working on a remote Linux system without root permission. I want to install python and pip locally. I have managed to install python, but failed on pip. The command I use is as follows:

wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py --user

The downloading succeeded, but when running the second command, I received the error message:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pip
Could not fetch URL https://pypi.python.org/simple/pip/: 
There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip

I also tried

python get-pip.py

But the error is the same. What's wrong with my commands? Thank you all for helping me!!!

Upvotes: 2

Views: 5507

Answers (1)

Xing
Xing

Reputation: 21

In this case, you will find that can't import ssl too.

The solution is:

  1. Install openssl, yum install openssl openssl-devel

  2. Configure source code

  3. then open Modules/Setup, and un-comment following part

    #SSL=/usr/local/ssl
    #_ssl _ssl.c \
    #       -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
    #       -L$(SSL)/lib -lssl -lcrypto
    
  4. make & make install python from source code

Upvotes: 1

Related Questions