哪里有做标书,佛山优化推广,成都房地产网站开发,wordpress wow.js安装须知#xff1a;我们使用Django、flask等来操作MySQL#xff0c;实际上底层还是通过Python来操作的。因此我们想要用Django来操作MySQL#xff0c;首先还是需要安装一个驱动程序。在Python3中#xff0c;驱动程序有多种选择。比如有pymysql以及mysqlclient等。常见的My…安装须知我们使用Django、flask等来操作MySQL实际上底层还是通过Python来操作的。因此我们想要用Django来操作MySQL首先还是需要安装一个驱动程序。在Python3中驱动程序有多种选择。比如有pymysql以及mysqlclient等。常见的Mysql驱动介绍MySQL-python也就是MySQLdb。是对C语言操作MySQL数据库的一个简单封装。遵循了Python DB API v2。但是只支持Python2目前还不支持Python3。mysqlclient是MySQL-python的另外一个分支。支持Python3并且修复了一些bug。pymysql纯Python实现的一个驱动。因为是纯Python编写的因此执行效率不如MySQL-python。并且也因为是纯Python编写的因此可以和Python代码无缝衔接。MySQL Connector/PythonMySQL官方推出的使用纯Python连接MySQL的驱动。因为是纯Python开发的。效率不高。执行 pip3 install mysqlclient1.4.6报错如下Collecting mysqlclient1.4.6Using cached https://files.pythonhosted.org/packages/d0/97/7326248ac8d5049968bf4ec708a5d3d4806e412a42e74160d7f266a3e03a/mysqlclient-1.4.6.tar.gzComplete output from command python setup.py egg_info:/bin/sh: 1: mysql_config: not found/bin/sh: 1: mariadb_config: not found/bin/sh: 1: mysql_config: not foundTraceback (most recent call last):File, line 1, in File/tmp/pip-build-gxoz145c/mysqlclient/setup.py, line 16, in metadata, optionsget_config()File/tmp/pip-build-gxoz145c/mysqlclient/setup_posix.py, line 61, inget_configlibs mysql_config(libs)File/tmp/pip-build-gxoz145c/mysqlclient/setup_posix.py, line 29, inmysql_configraise EnvironmentError(%s not found %(_mysql_config_path,))OSError: mysql_config not found----------------------------------------Commandpython setup.py egg_info failed with error code 1 in /tmp/pip-build-gxoz145c/mysqlclient/解决办法sudo apt install libmysqlclient-devsudo-H pip3 install -U mysqlclient1.4.6 -i https://mirrors.aliyun.com/pypi/simple/原文https://www.cnblogs.com/daofaziran/p/12604840.html