Python Forum

Full Version: How yo find "zlib" necessary for "pyenv" in Linux
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all! I am trying to make python 3.7.0 the default language, with "pyenv install 3.7.0" and then
"pyenv global 3.7.0". But when I install 3.7.0, about 5 minutes later, it breaks saying "can'tdecompress data, zlib not available". All my task now is to find and then install "zlib".
I tried already with "sudo apt-get update" followed by "apt-cache search zlib" without success . Have you an idea ? Thanks

@DeaD_EyE Many many thanks. Now 3.7.0 is my default language. Problem solved , with your 3 lines:
apt install build-essential
apt-get install libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev
apt-get install libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev
it's part of the standard library: https://docs.python.org/3.7/library/zlib.html
This type of error can be found simply by searching python docs, which should be standard practice.
simply:
import zlib
Note: when displaying errors, use error code tags and post complete verbatim error traceback