如何通过pip安装mysql-connector [英] How to install mysql-connector via pip
本文介绍了如何通过pip安装mysql-connector的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的Python项目中使用sqlalchemy访问MySQL. sqlalchemy的conf是这样的:
I use sqlalchemy to access MySQL in my Python project. sqlalchemy's conf is like this:
dialect=mysql
driver=mysqlconnector
所以我需要通过pip安装Python模块mysql连接器.有帮助吗?
So I need to install the Python module mysql connector via pip. Any help?
推荐答案
如果通过pip install mysql-connector
加载并导致错误Unable to find Protobuf include directory
,则这将很有用pip install mysql-connector==2.1.4
If loading via pip install mysql-connector
and leads an error Unable to find Protobuf include directory
then this would be useful pip install mysql-connector==2.1.4
mysql-connector
已过时,因此请使用pip install mysql-connector-python
. 此处相同
mysql-connector
is obsolete, so use pip install mysql-connector-python
. Same here
这篇关于如何通过pip安装mysql-connector的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文