首页 > 数据库技术 > 详细

Django Mysql驱动版本问题

时间:2020-04-06 14:06:00      阅读:96      评论:0      收藏:0      [点我收藏+]

 

提示错误

 mysqlclient 1.3.13 or newer is required; you have 0.9.3. 

raise ImproperlyConfigured(mysqlclient 1.3.13 or newer is required; you have %s. % Database.__version__)
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.

 

解决方法

在项目根目录下__init__.py 文件中修改如下

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

 

技术分享图片

Django Mysql驱动版本问题

原文:https://www.cnblogs.com/wangcongxing/p/12641628.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!