Python 2.7 not working anymore: cannot import name md5 Python 2.7 not working anymore: cannot import name md5 python python

Python 2.7 not working anymore: cannot import name md5


I had the same problem on macOS.

brew reinstall python@2 solved this problem.

Maybe you could try to reinstall python.


In this post might be a solution:

The python2.7 package is dependent to the libssl1_0_0 package (openssl_1.0 runtime librairies).

So you need to install it, and add the /usr/local/ssl/lib directory in $LD_LIBRARY_PATH environnent variable.


I too came across the same issue in macOS which I could not solve using the brew reinstall python@2 command.

So then I used the following command which worked for me.

brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/94d572a132a63651739fef1931f540404b7eaa31/Formula/python%402.rb