Thursday, May 3, 2018

zlib import error in python3

I have been getting import zlib error in python3. So, after a little search on the internet, I found and did the following which had a different lib error but it resolved the error for zlib and zipfile import which I was getting earlier:

cd Python-3.6.4
make clean
sudo apt-get install zlib1g-dev
./configure
make
make test
sudo make install

And now the import zlib/ zipfile worked.