NameError: name '_mysql' is not defined

I uninstalled the package mysqlclient and installed it again. I got the error when going through Django ORM section hope it works for you too.