How to Solve NameError: name 'md5' is not defined -- hashlib

Solution: Import the 'md5' module

# Add the following line to the top of your code
from hashlib import md5

 

For more information:
hashlib md5