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.
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/
来源:https://stackoverflow.com/questions/9328014/cant-not-install-distribute-zlib