Ubuntu 18.04 Pyenv Build Python 3.7 Common Error

July 19, 2019

Install Python 3.7 via pyenv

pyenv install 3.7.4

TLDR

sudo apt-get update
sudo apt-get install build-essential libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev

Common Errors

configure: error: no acceptable C compiler found in $PATH

sudo apt-get update
sudo apt-get install build-essential

zipimport.ZipImportError: can't decompress data; zlib not available

sudo apt-get install zlib1g-dev

ModuleNotFoundError: No module named '_ctypes'

sudo apt-get install libffi-dev

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

sudo apt install libssl-dev

WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?

sudo apt install libbz2-dev

WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?

sudo apt install libreadline-dev

WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?

sudo apt install libsqlite3-dev

References:

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.