django.core.exceptions . improverconfigured: mysqlclient 1.4.0 or new is required; you have

Django. Core. Exceptions. ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; You have solutions for 0.10.1
An error occurred today when replacing mysql database while learning django:
is written in _init_. Py

import pymysql
pymysql.install_as_MySQLdb()

Error: the django. Core. Exceptions. ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; You have 0.10.1.
This is actually a mismatch between django and Pymysql. Python3 is not supported by mysqldb.
1. Tried to comment the python/Lib/site – packages/django/db/backends/mysql/base. Py files
' ' 'if the version & lt; (1, 4, 0): Raise ImproperlyConfigured(' mysqlClient 1.4.0 or Newer is required; You have %s.' % Database.) '
2. Updated version of Django, also useless
Final solution:
init.py is changed to

import pymysql
pymysql.version_info = (1, 4, 13, "final", 0)
pymysql.install_as_MySQLdb()

Specify the Pymysql version directly
Xiaobai learns Python, if there is a mistake, please give me more advice

Read More: