Django使用ORM遇到的问题

问题1;mysqlclient 1.3.13 or newer is required; you have 0.9.3.

django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.

解决方法:

1)进入D:\Programs\Python\Python37\Lib\site-packages\django\db\backends\mysql\base.py注释35-36两行


问题2;AttributeError: 'str' object has no attribute 'decode'

AttributeError: 'str' object has no attribute 'decode'

解决方法:

1)进入D:\Programs\Python\Python37\Lib\site-packages\django\db\backends\mysql\operations.py

修改146行,把decode修改为encode

猜你喜欢

转载自www.cnblogs.com/ygzy/p/10841289.html