分类: Python/Ruby
2010-01-04 17:22:03
My python 2.6 can’t import zlib but no problem on another almost identical machine. Then I thought I could resolve it by cp some file from that machine into my PYTHONPATH. However, when I manually checked all directories contained in sys.path, nothing called ‘zlib.pyc’ is found. Then where dose python find packages exactly? FML
I remember when I was installing python, I got some errors (see http://blog.chinaunix.net/u/21990/showart.php?id=2139228) that contains zlib. Googled it and find this post which works for me brilliantly. Just run ‘apt-get build-dep python2.5’ before make! Depends on the network, this will take a very long time.