I tried to install with the command "pyenv install 3.7.0" and getting the error as follows
Downloading Python-3.7.0.tar.xz...
-> https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
Installing Python-3.7.0...
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems
BUILD FAILED (Ubuntu 14.04 using python-build 20180424)
I have checked with the solutions from https://github.com/pyenv/pyenv/wiki/Common-build-problems and tried
CFLAGS=-I/usr/include/openssl \
LDFLAGS=-L/usr/lib64 \
pyenv install -v 3.7.0
Again I am facing the same error as
The Python ssl extension was not compiled. Missing the OpenSSL lib?
Also tried to install python versions less than 3.7 which all are installed without error. Is there any dependent package or version update that I am missing here. I have openssl version
OpenSSL 1.0.1f 6 Jan 2014
Project description pyenv lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well. NOTE: This is a placeholder package. pyenv is a collection of shell scripts and not installable with pip.
PROTIP: When pyenv is installed, a folder ~/. pyenv is created under your user $HOME folder. Within the shims folder are every Python command in every installed version of Python—python, pip, etc.
Install that version using "make install". Install all other versions using "make altinstall". For example, if you want to install Python 2.5, 2.6 and 3.0 with 2.6 being the primary version, you would execute "make install" in your 2.6 build directory and "make altinstall" in the others.
In order to use the version of Python through pyenv, it's essential to understand the shell's PATH variable. PATH determines where the shell searches for files by the name of the command. You must ensure the shell will find the version of Python run by pyenv, not the one installed by default (which is often called the system version).
Python 3.6.9 and 3.6.10 was released as source only - there is no compiled version for Windows. You may wish to compile it yourself, but before you do, please read the good advice in this related thread. After pyenv install, we need to call pyenv rehash before setting it global/local as discussed here
Even if you already have Python installed on your system, it is worth having pyenv installed so that you can easily try out new language features or help contribute to a project that is on a different version of Python. Why Not Use System Python? “System Python” is the Python that comes installed on your operating system.
Before you install pyenv itself, you’re going to need some OS-specific dependencies. These dependencies are mostly development utilities written in C and are required because pyenv installs Python by building from source. For a more detailed breakdown and explanation of the build dependencies, you can check out the official docs.
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With