Skip to content Skip to sidebar Skip to footer

Python Using Easy_install Importerror: No Module Named _md5

I searched a lot and did not find any answer to this problem =( I have a CentOS 5 as a server, following this How To: http://wiki.osqa.net/display/docs/RHEL%2C+CentOS+5+Installatio

Solution 1:

My guess having had a similar issue on CentOS before, is that the ld path for the new Python isn't set, and it can't find its loadable modules folder.

The 3rd code block on this blog post shows setting an ld path for an opt Python (though it is 2.7): http://toey.tc20.net/2010/08/04/install-python-2-7-gevent-on-centos-5-x86_64/

I would assume that an installer would have done this as part of the install step, but maybe the blog post above will be of some help.

Solution 2:

I had the same problem and found that the issue is unrelated to _md5.so, but instead that hashlib is failing to import _hashlib.so within a try block, then getting to a different and normally unused section of code (where the _md5 problem shows up). Try:

import _hashlib.so

I got something like:

ImportError: <PATH>/lib/python2.7/lib-dynload/_hashlib.so: cannot restore segment prot after reloc: Permission denied

I googled that and found http://www.quantumwise.com/forum/index.php?topic=16.0 which says you need to do:

chcon -t texrel_shlib_t <PATH>/lib/python2.7/lib-dynload/_hashlib.so

This worked for me.

Solution 3:

Activepython 2.6 seems to have some problem in their latest build. please check for its former release.

Solution 4:

I also encounter the same issue like you, I fix it after I add the lib path of python where the module will be installed.

It is really caused by LD_LIBRARY_PATH, please try to add "/opt/ActivePython-2.6/lib" into your LD_LIBRARY_PATH.

setenv LD_LIBRARY_PATH /opt/ActivePython-2.6/lib:$LD_LIBRARY_PATH

Solution 5:

Credit to http://johnsofteng.wordpress.com/2009/06/21/python-importerror-no-module-named-_md5/

I met the similar problem on Redhat 6.4, python binary (2.7.x) packages is copied from other already installed system (which is built from source).

The problem is the _hashlib.so, which miss the libssl.so.0.9.8

bash-4.1# ldd /proj/application/tools/python2.7/lib/python2.7/lib-dynload/_hashlib.so
    linux-vdso.so.1 =>  (0x00007fff51d6f000)
    libssl.so.0.9.8 => not found
    libcrypto.so.0.9.8 => /usr/lib64/libcrypto.so.0.9.8 (0x00007f9a69746000)
    libpython2.7.so.1.0 => /proj/application/tools/python2.7/lib/libpython2.7.so.1.0 (0x00007f9a6936b000)

I just install missed package and soft link to the library.

bash-4.1# yum install -y tar openssh-clients
bash-4.1# ln -s /usr/lib64/libssl.so.0.9.8e /usr/lib64/libssl.so.0.9.8

Then the setuptool installation is successful

Post a Comment for "Python Using Easy_install Importerror: No Module Named _md5"