django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclie

环境pycharm2021.1.1+python3.7+django3.2.11

测试项目时,打开python控制台出现django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclient?错误

驱动正常,数据库配置也正常,__init__.py也添加了这个

import pymysql

pymysql.install_as_MySQLdb()

解决: pip -m install mysqlclient

上一篇:cocoapod 安装


下一篇:Jupyter Notebook实现代码的自动补全