No modules were found with the name zlib

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

I tried to import zlib, but it does not talk about a module named zlib. How to install zlib module for it

After I tried installing python2.6.8, I got the same error as zlib. When installing it, I got an error below

Could not find the necessary bits to build these modules:

_bsddb _curses _curses_panel _hashlib _sqlite3 _ssl _tkinter bsddb185 bz2 dbm dl gdbm imageop linuxaudiodev ossaudiodev readline sunaudiodev zlib 

To find the required bits, go to setup.py in detect_modules () for the module name.

Failed to create these modules:

 crypt nis 
+5
source share
4 answers

I tried that helped me with some of these modules.

You must edit setup.py.
Locate the following lines in the setup.py line:

 lib_dirs = self.compiler.library_dirs + [ '/lib64', '/usr/lib64', '/lib', '/usr/lib', ] 

For 64-bit
Add /usr/lib/x86_64-linux-gnu :

 lib_dirs = self.compiler.library_dirs + [ '/lib64', '/usr/lib64', '/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu', ] 

For 32-bit
Add /usr/lib/i386-linux-gnu :

 lib_dirs = self.compiler.library_dirs + [ '/lib64', '/usr/lib64', '/lib', '/usr/lib', '/usr/lib/i386-linux-gnu', ] 

Note x86_64-linux-gnu and i386-linux-gnu may be located elsewhere on your system, so the path is accordingly.

To do this, you will only have the following modules:

 _bsddb bsddb185 dbm gdbm sunaudiodev 
+7
source

I wrote a note for myself, addressing your problem, it may be useful: python installation .

Do you really need bsddb and sunaudiodev ? You might not want to, as both of them are deprecated since python 2.6

+2
source

I solved the problem with adding the LDFLAGS=-L/usr/lib/x86_64-linux-gnu parameter as configure .

+2
source

I had this exact problem (exact python distribution). The answer to Dmity almost worked ... but after many hours of searching, I think I found the problem (assuming you are using ubuntu 11.10 - 12.10)

Ok, so for me, at least the problem is that Ubuntu has disabled SSLv2, so the workaround is pretty much in demand. Basically, you need to delve into the source code and remove all the SSLv2 links before creating it, in addition to adding the library paths to your installation file. I followed this guide and now I have a working virtual disk with python-2.6.8:

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

(Patches are pretty easy to implement without using patch ). We hope this helps resolve the issues. Phew

+1
source

Source: https://habr.com/ru/post/986058/


All Articles