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/”, line 6, in
from hashlib import md5
File “/usr/lib/python2.5/”, line 133, in
md5 = __get_builtin_constructor(‘md5’)
File “/usr/lib/python2.5/”, 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: and, and also which is supplied by libc), but the openssl-0.9.8a only supply the and at /lib/, solution as following:
1. login as user “root”
2. cd /lib/
3. ln –s
4. ln -s
5. check in the python: execute python, then input “import md5”, if there is no output, the bug is fixed.

Make a Comment

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

5 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 ?


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

Easy_install simplejason

helped, thanks!

Where's The Comment Form?

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

%d bloggers like this: