How to Solve NameError: name 'parse_version' is not defined -- pkg_resources

Solution: Import the 'parse_version' module

# Add the following line to the top of your code
from pkg_resources import parse_version

 

For more information:
pkg_resources parse_version