Random notes from mg

a blog by Marius Gedminas

Marius is a Python hacker. He works for Programmers of Vilnius, a small Python/Zope 3 startup. He has a personal home page at http://gedmin.as. His email is marius@gedmin.as. He does not like spam, but is not afraid of it.

Wed, 07 Jul 2010

ImportError: No module named _md5

If you're using virtualenv, and after a system upgrade you get errors like

...
  File "...", line ...
    from hashlib import md5
  File "/usr/lib/python2.6/hashlib.py", line 63, in __get_builtin_constructor
     import _md5
ImportError: No module named _md5

this means that the copy of the python executable in your virtualenv/bin directory is outdated and you should update it:

$ cp /usr/bin/python2.6 /path/to/venv/bin/python

or, better yet, recreate the virtualenv.

posted at 01:20 | tags: , | permanent link to this entry | 2 comments
That explains so much! I thought it was strange that a perfectly working virtualenv (not used for a long time) had just stopped working.
posted by Peter Bengtsson at Wed Jul 7 15:18:02 2010
Many thanks for posting this!!
posted by Gene at Sat Dec 18 22:43:11 2010

Name (required)


E-mail (will not be shown)


URL


Comment (some HTML allowed)