the pycharm development project is deployed to the server, a
Mysqlclient 1.3.13 or newer is required; You have 0.9.3.
Error,
Generally means the current mysqlclient version is too low, need 1.3.13 version above,
The solution:
Refer to the great god of https://www.jianshu.com/p/e21a57bdd2fb, a method to solve the problem,
In the init. Py files can solve the introduction of the modified pymysql way,
Modify before:
The import pymysql
Pymysql. Install_as_MySQLdb ()
Revised:
The import MySQLdb
Conclusion:
According to the official website, the Django framework used in mysqlclent need version in 1.3.13 or higher,
Using PIP install pymysql highest can only download 0.9.3 version,
Really, online also didn't find a way to upgrade pymysqlclient version,
So can only do not need to rely on third-party libraries mysqldb to replace
Finally:
My food, don't spray,
Still want to weak weak ask have you people know how to upgrade mysqlclent, leave a to teaches the following taught me bai, thank you!
CodePudding user response:
The command line run the following command: PIP install - upgrade library nameOr to download a 1.3 mysqlclient source code, and then use python setup. Py the install installation
CodePudding user response:
The characteristics of the django 2.2Install mysqlclient,
Windows download from here
https://www.lfd.uci.edu/~gohlke/pythonlibs/
I use: 1.4.2 version https://download.lfd.uci.edu/pythonlibs/t4jqbe6o/mysqlclient-1.4.2-cp37-cp37m-win_amd64.whl
Linux version (yum) to install mysql - first devel (not too new, not a devel mariadb 10, 5.5 b) to PIP install mysqlclient
CodePudding user response:
Go to the website to find the package mysqlclient, then PIP install package name. WHL