pyenv can get particularly annoying during building Python. Dependencies are often missing resulting in failed builds. This short blog post is outlining the required dependencies to reduce headaches for future me, and anyone else reading this.
You have probably come here seeing errors like:
zipimport.ZipImportError: can't decompress data; zlib not available
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib? WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib? WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib? ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
Well, just install these and you'll be good to go.
$ sudo apt-get build-dep python3 $ sudo apt-get install libreadline-dev libsqlite3-dev bz2-dev libssl-dev zlib1g-dev libffi-dev