Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't not install Distribute, zlib

At first, I only want to use install feedparser with python3.2, while it need Distribute. When I install Distribute with

python3.2 setup.py install

I got

File "/usr/local/lib/python3.2/zipfile.py", line 687, in __init__
"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module

Then I downloaded zlib and installed it with

./configure --prefix=/usr/local/python3.2
make
sudo make install

After the installation, and tried to install Distribute, I got the same error.

like image 426
itsuper7 Avatar asked Feb 17 '12 12:02

itsuper7


1 Answers

Finally, I solved it by re-install python3.2 with zlib.

1 Of course, you need to install zlib first. and you can find zlib.h in /usr/include

2

./configure -with-zlib=/usr/include
make 
sudo make install

from http://www.1stbyte.com/2005/06/26/configure-and-compile-python-with-zlib/

like image 65
itsuper7 Avatar answered Sep 18 '22 07:09

itsuper7