Python3.7 pip installation class library error: ssl module in Python is not available

[root@10-23-67-69 Python-3.7.0]-sharp python3
Python 3.4.8 (default, Apr  9 2018, 11:43:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl

[root@10-23-67-69 Python-3.7.0]-sharp pip3 install numpy numpyssl
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting numpy
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by "SSLError("Can"t connect to HTTPS URL because the SSL module is not available.")": /simple/numpy/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by "SSLError("Can"t connect to HTTPS URL because the SSL module is not available.")": /simple/numpy/

what can I do to ensure that pip installs the class library without reporting errors?


pip3 install openssl try


check whether the python3.4.8 in the first step is in the same py environment as the pip3 in the second step.


pip3 install openssl-I https://mirrors.aliyun.com/pypi/simple/


operating system needs to install ssl, such as centos yum install openssl*-y


http://blog.51cto.com/1354442.

.
Menu