How to install python 3.7.0 using pyenv?

Is there any dependent package or version update that I am missing here.

Yes, unfortunately there is. Python 3.7.0 requires OpenSSL 1.0.2. I couldn't find a better source than the dev mailing list. So far I've been unsuccessful getting Python 3.7.0 working on Ubuntu 14.04, as getting the right version of OpenSSL installed and not conflicting has been a trick.

Python 3.7: Require OpenSSL >=1.0.2

https://mail.python.org/pipermail/python-dev/2018-January/151718.html


You can install the same by first installing [email protected] by the command

    brew install '[email protected]'

And the you can install python3.7 using:

    CONFIGURE_OPTS="--with-openssl=$(brew --prefix [email protected])" pyenv install 3.7.0

Or if you don't want to install any specific version for openssl, then you can use the below command for openssl package.

    CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl)" pyenv install 3.7.0