Solving solutions Django configuration pymysql depending on the version of error

1. error contents:

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

The reason: a mismatch django2.2 and pymysql version. mysqldb does not support python3 solution:

Two errors occur simultaneously

. 1, The raise ImproperlyConfigured ( '. 1.3.13 or newer the mysqlclient IS required; you have have S%'% Database.version)
  django.core.exceptions.ImproperlyConfigured: the mysqlclient 1.3.13 or newer IS required; you have have 0.9.3.  
Solution Measures:
C: \ Python37 \ Lib \ Site-Packages \ Django \ DB \ backends \ MySQL (Python installation directory) open base.py, comment out the following: IF Version <(. 1,. 3, 13 is):         
         

raise ImproperlyConfigured(‘mysqlclient 1.3.13 or newer is required; you have %s.’ % Database.version)   
2、AttributeError: ‘str’ object has no attribute ‘decode’    

File "C: \ Python37 \ lib \ Site-Packages Standard Package \ Django \ db \ backends \ MySQL \ operations.py", Line 146, in last_executed_query   
Query = query.decode (errors = 'the replace')  
Solution:
Open the file decode 146 rows modified to encode

Guess you like

Origin www.cnblogs.com/gaoqinggang/p/11426008.html
Recommended