(数据迁移老问题)django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.2

I、将你的Django降低到2.14以下即可:这个不用想,就要用最新的

II、升级的mysql客户端版本至更高:电脑同时运行的还有php等其他语言,懒得折腾

III、按照以下步骤修改代码:

修复源码
按照文中配置,报错django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
原因:django2.2和pymysql版本不匹配。mysqldb不支持python3.

# 解决办法:(约35-37行)
C:Python37Libsite-packagesdjangodbackendsmysql(python安装目录)打开base.py,注释掉以下内容:        
# if version < (1, 3, 13):           raise ImproperlyConfigured(‘mysqlclient 1.3.13 or newer is required; you have %s.’ % Database.version)   


File “C:Python37libsite-packagesdjangodbackendsmysqloperations.py”, line 146, in last_executed_query   
# query = query.decode(errors=‘replace’)   
# AttributeError: ‘str’ object has no attribute ‘decode’   

解决办法:
打开此文件把146行的decode修改为encode
原文地址:https://www.cnblogs.com/lucky-cat233/p/13458854.html