Ubuntu 18.04 Pyenv Build Python 3.7 Common Error

Install Python 3.7 via pyenv

pyenv install 3.7.4

TLDR

sudo apt-get updatesudo apt-get install build-essential zlib1g-dev libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev

Optional

sudo apt-get install tk-dev

Common Errors

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

sudo apt-get updatesudo 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

UserWarning: Could not import the lzma module. Your installed Python is incomplete

sudo apt-get install liblzma-dev

References:

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.