zoukankan      html  css  js  c++  java
  • django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.2

    使用python3.7+django2.2+pymysql时遇到这个错误:

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

    解决方案:
    1、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.  
    解决办法:
    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)   
    2、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://blog.csdn.net/weixin_45476498/article/details/100098297

  • 相关阅读:
    linux cpu load学习笔记
    P1064 金明的预算方案
    P1757 通天之分组背包
    P1352 没有上司的舞会
    P1651 塔
    P1250 种树
    P1938 [USACO09NOV]找工就业Job Hunt
    P4392 [BOI2007]Sound 静音问题
    P3884 [JLOI2009]二叉树问题
    P2880 [USACO07JAN]平衡的阵容Balanced Lineup
  • 原文地址:https://www.cnblogs.com/bubutianshu/p/12030765.html
Copyright © 2011-2022 走看看