win10 下 django2.2生成mysql数据迁移文件出错(mysqlclient 1.3.13 or newer is required; you have 0.9.3)解决方法
2019-06-08 00:03
881 查看
win10 下 django2.2生成mysql数据迁移文件出错(mysqlclient 1.3.13 or newer is required; you have 0.9.3)解决方法
找到Python环境下 django包,并进入到backends下的mysql文件夹
C:\xxxxx\Programs\Python\Python37\Lib\site-packages\django\db\backends\mysql
找到base.py文件,注释掉 base.py 中如下两行代码
if version < (1, 3, 3): raise ImproperlyConfigured("mysqlclient 1.3.3 or newer is required; you have %s" % Database.__version__)
然后找到operations.py文件找到如下的代码,并将decode改为encode
if query is not None: query = query.decode(errors='replace') return query #改为 if query is not None: query = query.encode(errors='replace') return query
根据作者Hayley-L 的博文改写
原文:https://blog.csdn.net/weixin_33127753/article/details/89100552
相关文章推荐
- django.core.exceptions.ImproperlyConfigured: 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
- django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.3 or newer is required; you have 0.7.11
- Django连接mysql django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.3 or newer is required;
- macOS使用django安装mysqlclient遇到的问题(mysqlclient 1.3.3 or newer is required)
- 解决 Django 的 if version (1, 3, 3): raise ImproperlyConfigured("mysqlclient 1.3.3 or newer is requi
- mysql导入数据库文件最大限制更改解决方法:phpmyadmin数据库导入出错:You probably tried to upload too large file
- XAMP下tomcat无法启动:Make sure you have Java JDK or JRE installed and the required ports are free解决方法
- git报错:Pull is not possible because you have unmerged files解决方法
- 解决The 'InnoDB' feature is disabled; you need MySQL built with 'InnoDB' to have it working
- Navicat导入mysql大数据时出错解决方法
- MySQL导入及导出文件出错ERROR 1290 (HY000)解决方法
- 解决mysql 添加插件时提示 ERROR 1289 (HY000): The &#8216;plugin&#8217; feature is disabled; you need MySQL built with &#8216;HAVE_DLOPEN&#
- ubuntu16.04 修改mysql配置文件my.cnf编码出错---解决方法
- Git 一些错误的解决方法 Pull is not possible because you have unmerged files.
- mysql导入数据库文件最大限制更改解决方法You probably
- 解决The 'InnoDB' feature is disabled; you need MySQL built with 'InnoDB' to have it (http://ruijunsu)
- mysql 的 “You must reset your password ..."出错解决方法之一
- Android Studio启动报错Java 1.8 or later is required的解决方法
- mysql导入sql文件出错的一种解决方法