1

I have this version of openssl installed on CentOS:

# openssl version
OpenSSL 1.0.2o  27 Mar 2018

I have an altinstall of Python (Python 3.6.5).

When I try updating Pip, I get this error:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

I checked the Python and found it not connected to openssl. How can I connect it to this altinstall?

# python3.6 -c "import ssl; print(ssl.OPENSSL_VERSION)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.6/ssl.py", line 101, in <module>
    import _ssl             # if we can't import it, let the error propagate
ModuleNotFoundError: No module named '_ssl'

Trying to install ssl module:

# pip3.6 install ssl

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Zeno
  • 1,769
  • 7
  • 33
  • 61
  • Possible duplicate of https://stackoverflow.com/questions/41328451/ssl-module-in-python-is-not-available-when-installing-package-with-pip3 – TrungNgo Jun 01 '18 at 02:08
  • Have you installed python ssl module ? – Shyam Joshi Jun 01 '18 at 02:30
  • @ShyamJoshi What method should I do to install it? I tried: `# pip3.6 install ssl` `pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.` – Zeno Jun 01 '18 at 02:33
  • yum install openssl-devel -y try installing devel – Shyam Joshi Jun 01 '18 at 04:20

0 Answers0