python3提示错误“ImportError: No module named ‘MySQLdb’”
解决:python2和python3在数据库模块支持这里存在区别,python2是mysqldb,而到了python3就变成pymysql,安装pymysql :pip3 install PyMySQL
pymysql 报错:from . import connections # noqa: E402
原因:PyMySQL的最新版,不支持Python 2.7 和 3.5版本了
解决:不使用 Flask-MySQL 安装的PyMySQL最新版,指定PyMySQL版本为0.10.1,sudo pip3 install pymysql==0.10.1
python 3.7 要安装最新版,不然报错:No module named ‘pymysql’
python3 -m pip install pymysql
解决:https://blog.csdn.net/weixin_43840640/article/details/89603062
报错:TypeError: init() takes 1 positional argument but 5 were given
解决:https://blog.csdn.net/SunshinePluto/article/details/112555362
参考:https://blog.csdn.net/weixin_44678368/article/details/112631405