"The Python ssl extension was not compiled. Missing the OpenSSL lib?" error when installing Python using pyenv

10,796

If the python version you are trying to install is equal or lower than 2.7.12, it does not support OpenSSL1.1.0, so you would need to replace libssl-dev with libssl1.0-dev.

Ubuntu 18.04 is the first official release to switch to OpenSSL1.1.0 which is why you might not have been impacted with this in the past.

Reference: https://github.com/pyenv/pyenv/issues/945

https://github.com/pyenv/pyenv/wiki/common-build-problems#error-the-python-ssl-extension-was-not-compiled-missing-the-openssl-lib

Share:
10,796

Related videos on Youtube

codehia
Author by

codehia

Updated on September 18, 2022

Comments

  • codehia
    codehia over 1 year

    While installing Python using pyenv, I am getting the following error:

    ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
    

    I am using Ubuntu 18.04 Bionic Beaver How do I solve this issue?

  • codehia
    codehia about 6 years
    I am still getting the same error. Can you suggest some other solution?