No module named zlib found

后端 未结 4 814
栀梦
栀梦 2021-01-13 06:53

I download python2.6.6 source form http://www.python.org/getit/releases/2.6.6/ After that I run these commands ./configure make

I tried to import zlib but it says no

4条回答
  •  [愿得一人]
    2021-01-13 07:42

    I had this exact problem (exact python distribution as well) Dmity's answer almost worked... but after many hours searching I think I have found the issue (assuming you are using ubuntu 11.10 - 12.10)

    Ok, so for me at least the problem stemmed from the fact that Ubuntu disabled SSLv2, so the workaround is fairly involved. Basically you have to delve into the source code and remove all references to SSLv2 before you build it, in addition to adding library paths to your setup file. I followed this tutorial and now I have a working virtualenv with python-2.6.8:

    http://ubuntuforums.org/showthread.php?t=1976837

    (The patches are fairly easy to implement without using patch) Hope this helps clear up the issues. PHEW

提交回复
热议问题