Python: ImportError: No module named _md5

Posted on June 21, 2009. Filed under: Python |

Python 2.5.1 (r251:54863, Sep 3 2007, 17:35:15)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import md5
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib/python2.5/md5.py”, line 6, in
from hashlib import md5
File “/usr/lib/python2.5/hashlib.py”, line 133, in
md5 = __get_builtin_constructor(‘md5′)
File “/usr/lib/python2.5/hashlib.py”, line 60, in __get_builtin_constructor
import _md5
ImportError: No module named _md5

Searching on the Internet, It is caused incompatible by Python 2.5.1 and openssl-0.9.8a, the python 2.5.1 need the openssl library (symbol link: libssl.so.4 and libcrypto.so.4, and also libc.so.6 which is supplied by libc), but the openssl-0.9.8a only supply the libssl.so.6 and libcrypto.so.6 at /lib/, solution as following:
1. login as user “root”
2. cd /lib/
3. ln –s libssl.so.0.9.8e libssl.so.4
4. ln -s libcrypto.so.0.9.8e libcrypto.so.4
5. check in the python: execute python, then input “import md5”, if there is no output, the bug is fixed.

About these ads

Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

4 Responses to “Python: ImportError: No module named _md5”

RSS Feed for John's Blog Comments RSS Feed

Thank you so much, you saved me a lot of time.

hi, I have followed your procedure, nevertheless it did not fix the problem, do you have any other advise ?

thanks

I have no clue of other cases, I just have this issue and record it, sorry about that :(

helped, thanks!


Where's The Comment Form?

Liked it here?
Why not try sites on the blogroll...

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: