Python3連接數據常見的問題

問題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

https://www.cnblogs.com/ygzy/p/10841289.html

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章