pip 安装mysql-python失败 5

pipinstallmysql-python失败,请教各路大神帮忙错误信息如下:Infileincludedfrom_mysql.c:44:0:/usr/include/... pip install mysql-python失败,请教各路大神帮忙
错误信息如下:
In file included from _mysql.c:44:0:
/usr/include/mysql/my_config.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
#warning This file should not be included by clients, include only <mysql.h>
^
_mysql.c: In function ‘_mysql_ConnectionObject_ping’:
_mysql.c:2005:41: error: ‘MYSQL’ has no member named ‘reconnect’
if ( reconnect != -1 ) self->connection.reconnect = reconnect;
^
error: command 'gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-HLXaCg/MySQL-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-XEC8eZ/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-HLXaCg/MySQL-python/

一下依赖包都已经全部安装了:yum -y install gcc python-devel mysql-devel
展开
 我来答
waketzheng
2018-05-06 · TA获得超过644个赞
知道小有建树答主
回答量:566
采纳率:63%
帮助的人:150万
展开全部

pip install mysqlclient

https://github.com/PyMySQL

本回答被网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式