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?
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
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.
According to the documentation, a simple:
pip install pyopenssl
should do the job. If
pip is not installed, run
sudo apt install python-pip
and then run the command again.