-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
- installed mysqlclient
pip install mysqlclient, error come out after set db in global settings.py
File "/Users/yong/python-envs/dj3/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 21, in <module>) from err
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
- installed pymysql
python3 -m pip install PyMySQL, or justpip install pymysql - add the code in the global/project
__init__.py
# project __init__.py
import pymysql
pymysql.install_as_MySQLdb()but still error come out with version
File "/Users/yong/python-envs/dj3/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 37, in <module>
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.
then, go to python-envs/dj3/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 37 as the error showed out.
- comment the line37, and add
passbelow
if version < (1, 3, 13):
# raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)
passReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
