ImportError: no module named md5

Solution 1:

md5 is (from the python docs:) "deprecated since version 2.5: Use the hashlib module instead".

You need hashlib. It is in the zlib module and that is in the zlib1g package and/or zlib1g-dev package.