$ pip search mysql-connector | grep ^mysql-connector
mysql-connector (2.1.6) - MySQL driver written in Python
mysql-connector-python (8.0.13) - MySQL driver written in Python
mysql-connector-repackaged (0.3.1) - MySQL driver written in Python
mysql-connector-async-dd (2.0.2) - mysql async connection
mysql-connector-python-rf (2.2.2) - MySQL driver written in Python
mysql-connector-python-dd (2.0.2) - MySQL driver written in Python
如果通过
pip install mysql-connector
加载并导致错误Unable to find Protobuf include directory
,那么这将非常有用pip install mysql-connector==2.1.4
mysql-connector
已过时,因此请使用pip install mysql-connector-python
。Same here最后,也可以通过源代码安装mysql连接器
从以下位置下载源代码: https://dev.mysql.com/downloads/connector/python/
要安装Python的MySQL官方连接器,请使用名称
mysql-connector-python
:进一步讨论,当我们此时(2018年11月)对
mysql-connector
进行pip search
时,最相关的结果如下:PyPI上提供了
mysql-connector (2.1.6)
,而MySQL一开始没有在PyPI上提供官方的pip install
(这很不方便)。但它是一个fork,并且停止更新,所以将安装此过时版本。
现在PyPI上的
mysql-connector-python (8.0.13)
是MySQL维护的官方包,所以我们应该安装这个包。相关问题 更多 >
编程相关推荐