Python:MySQLdb 安装问题

标签 python

Mysql版本5.0.77
Python版本2.5

#easy_install MySQL-python

当我尝试安装时,出现以下错误:

_mysql.c:2331: error: â_mysql_ConnectionObjectâ has no member named âopenâ
_mysql.c:2338: error: â_mysql_ConnectionObjectâ has no member named âconverterâ
_mysql.c:2345: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ
_mysql.c:2352: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ
_mysql.c:2359: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ
_mysql.c:2422: error: â_mysql_ResultObjectâ has no member named âconverterâ
_mysql.c:2422: error: initializer element is not constant
_mysql.c:2422: error: (near initialization for â_mysql_ResultObject_memberlist[0].offsetâ)
_mysql.c:2444: error: â_mysql_ConnectionObjectâ has no member named âopenâ
error: Setup script exited with error: command 'gcc' failed with exit status 1

如何解决这个问题?

最佳答案

yum 安装 mysql-devel

那么,

easy_install MySQL-python

关于Python:MySQLdb 安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5242362/

相关文章:

python - Pandas 根据列的值有效地分块读取大型面板 CSV

python - 如何使用 Python 下载 Confluence 页面附件?

python - 需要下划线的否定环视或否定断言的正则表达式

python - 使用 Pandas/ExcelWriter 为单元格中的文本部分着色

python:打印数字,例如两个自然数的乘积

python - Last.FM使用pylast程序时不能返回超过500条记录

python - 多个 -m 命令行参数 (Python)

python - django 中的有序列表

python - 如何制作一个用缩写替换某些单词的函数?

Python 创建一个返回 n 个 8 位二进制字符串的文件