1

I am trying to install Python 2.7.8 and Python 3.6.7 using Pyenv but I have always the same problem:

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

BUILD FAILED (Ubuntu 18.04 using python-build 20180424)

Inspect or clean up the working tree at /tmp/python-build.20190531162212.22464
Results logged to /tmp/python-build.20190531162212.22464.log

Last 10 log lines:
        install|*) ensurepip="" ;; \
    esac; \
     ./python -E -m ensurepip \
        $ensurepip --root=/ ; \

I have tried all the possibilities in the pyenv common problems and changed the OPENSSL version.

  • Please add pyenv versions , openssl version – Nico Coallier Jun 3 '19 at 19:33
2

I think what happened is a path issue between your python version and your pyenv python version.

You must have hardcoded the python version through an alias or something into the .bashrc file.

Just :

  • uninstall pyenv
  • go into the bashrc file and remove python alias
  • install pyenv again
| improve this answer | |
  • Thank's! Your recommendation solved my problem for the Python 3.6.7 installation! I still have the same issue for the python 2.7.8 installation, but the major problem ( being able to install a stable version of python 3.6 ) is solved! – Pau Al Jun 3 '19 at 22:02
  • You might wanna stick with python3 if you don't need python2 for a specific reason since python2 is going to be discontinued – Nico Coallier Jun 3 '19 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.