Django. Core. Exceptions. ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; You have solutions for 0.10.1
An error occurred today when replacing mysql database while learning django:
is written in _init_. Py
import pymysql
pymysql.install_as_MySQLdb()
Error: the django. Core. Exceptions. ImproperlyConfigured: mysqlclient 1.4.0 or newer is required; You have 0.10.1.
This is actually a mismatch between django and Pymysql. Python3 is not supported by mysqldb.
1. Tried to comment the python/Lib/site – packages/django/db/backends/mysql/base. Py files
' ' 'if the version & lt; (1, 4, 0): Raise ImproperlyConfigured(' mysqlClient 1.4.0 or Newer is required; You have %s.' % Database.) '
2. Updated version of Django, also useless
Final solution:
init.py is changed to
import pymysql
pymysql.version_info = (1, 4, 13, "final", 0)
pymysql.install_as_MySQLdb()
Specify the Pymysql version directly
Xiaobai learns Python, if there is a mistake, please give me more advice
Read More:
- django.core.exceptions . improveconfigured: error loading MySQL DB module. Django configuring MySQL database
- Error: command error out with exit status 1: Python when installing mysqlclient in django2.0 setup.py egg_ info
- ubuntu install mysqlclient error ERROR: Failed building wheel for mysqlclient solution
- MSDN I tell you new site next I tell you open invitation code registration! Today’s quota is 5000!
- Angular Error You seem to not be depending on “@angular/core“ and/or “rxjs“. (Fixed)
- numpy.core._exceptions.MemoryError: Unable to allocate xxx GB
- raise RuntimeError(RuntimeError: ‘cryptography‘ package is required for sha256_password or caching
- [Solved] error: Microsoft Visual C++ 14.0 or greater is required
- Synergy Ubuntu 18 + win7 timed out or new client is unresponsive
- How to solve the problem of “version 11 or greater is required” in eclipse 2020
- Version 1.8.0_201 of the JVM is not suitable for this product. Version: 11 or greater is required.
- 【.Net Core】using declarations‘ is not available in C# 7.3. Please use language version 8.0 or greate
- When Python Django creates a database, can’t open file ‘ manage.py ‘: [Errno 2] No such file or directory
- Solve the problem of error loading MySQL DB module. Encountered during Django project
- Error: sudo required (or change ownership, or define N_PREFIX)
- C ා programming encountered an object reference is required for the non-static field, method, or property error
- Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“
- How to solve the problem of error reporting in the introduction of Python Django no module name ‘Django. Utils. Six’
- Python MAC installation mysqlclient package error “error: Command ‘clang’ failed with exit status 1” solution
- [Solved] VUE-pdf Plugin use error: To install them, you can run: npm install –save core-js/modules/es