python2.6.6安装MySQL-python模块正确方法
Centos6.5 x64 系统python2.6.6安装MySQL-python模块
一、安装前准备
操作系统:centos6.5 x64
·安装python和python开发工具
python python-devel
·安装mysql-server和mysql开发工具
mysql-server mysql mysql-devel
yum -y install mysql-devel libxml2 libxml2-dev libxslt* zlib gcc openssl
1.下载安装setuptools
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c8.tar.gz
[root@localhost opt]#wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c8.tar.gz
[root@localhost opt]#tar xzf setuptools-0.6c8.tar.gz
[root@localhost setuptools-0.6c8]# python setup.py build
[root@localhost setuptools-0.6c8]# python setup.py install
2.下载安装MySQL-python
[root@localhost opt]# wget http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz/download
[root@localhost opt]# cd MySQL-python-1.2.3/
[root@localhost MySQL-python-1.2.3]$ sudo python setup.py build
[root@localhost MySQL-python-1.2.3]$ sudo python setup.py install
以上即可安装成功
二、安装过程中遇到的错误
查找了原因是因为没有安装mysql和python开发环境。
解决方法: sudo yum install python-devel mysql-devel
然后在安装一次即可成功
[root@localhost MySQL-python-1.2.3]# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.6/MySQLdb
running build_ext
building '_mysql' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/include/mysql -I/usr/include/python2.6 -c _mysql.c -o build/temp.linux-x86_64-2.6/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -DUNIV_LINUX -DUNIV_LINUX
在包含自 _mysql.c:29 的文件中:
pymemcompat.h:10:20: 错误:Python.h:没有那个文件或目录
_mysql.c:30:26: 错误:structmember.h:没有那个文件或目录
_mysql.c:62: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:63: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:64: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:65: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:66: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:67: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:68: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:69: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:70: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:71: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:72: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:75: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
_mysql.c:85: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_Type’
_mysql.c:88: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
_mysql.c:96: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_Type’
_mysql.c:105: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:227: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:318: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:336: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:359: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c:360: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: 在函数‘_mysql_ResultObject_Initialize’中:
_mysql.c:362: 错误:‘NULL’未声明(在此函数内第一次使用)
_mysql.c:362: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
_mysql.c:362: 错误:所在的函数内也只报告一次。)
_mysql.c:364: 警告:从不兼容的指针类型初始化
_mysql.c:366: 错误:‘PyObject’未声明(在此函数内第一次使用)
_mysql.c:366: 错误:‘conv’未声明(在此函数内第一次使用)
_mysql.c:366: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:366: 警告:语句不起作用
_mysql.c:370: 警告:隐式声明函数‘PyArg_ParseTupleAndKeywords’
_mysql.c:370: 错误:‘args’未声明(在此函数内第一次使用)
_mysql.c:370: 错误:‘kwargs’未声明(在此函数内第一次使用)
_mysql.c:373: 警告:隐式声明函数‘PyDict_New’
_mysql.c:373: 警告:语句不起作用
_mysql.c:375: 错误:‘_mysql_ResultObject’没有名为‘conn’的成员
_mysql.c:375: 错误:expected expression before ‘)’ token
_mysql.c:375: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:375: 警告:语句不起作用
_mysql.c:376: 警告:隐式声明函数‘Py_INCREF’
_mysql.c:377: 错误:‘_mysql_ResultObject’没有名为‘use’的成员
_mysql.c:377: 警告:语句不起作用
_mysql.c:378: 错误:‘Py_BEGIN_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:378: 警告:语句不起作用
_mysql.c:380: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:380: 警告:传递‘mysql_use_result’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:458: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:382: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:382: 警告:传递‘mysql_store_result’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:457: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:383: 错误:‘_mysql_ResultObject’没有名为‘result’的成员
_mysql.c:383: 警告:语句不起作用
_mysql.c:384: 错误:‘Py_END_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:384: 警告:语句不起作用
_mysql.c:386: 错误:‘_mysql_ResultObject’没有名为‘converter’的成员
_mysql.c:386: 警告:隐式声明函数‘PyTuple_New’
_mysql.c:386: 警告:语句不起作用
_mysql.c:390: 错误:‘_mysql_ResultObject’没有名为‘nfields’的成员
_mysql.c:390: 警告:语句不起作用
_mysql.c:391: 错误:‘_mysql_ResultObject’没有名为‘converter’的成员
_mysql.c:394: 错误:‘tmp’未声明(在此函数内第一次使用)
_mysql.c:394: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:394: 错误:‘fun’未声明(在此函数内第一次使用)
_mysql.c:394: 警告:逗号表达式的左操作数不起作用
_mysql.c:394: 警告:语句不起作用
_mysql.c:395: 警告:隐式声明函数‘PyInt_FromLong’
_mysql.c:395: 警告:语句不起作用
_mysql.c:397: 警告:隐式声明函数‘PyObject_GetItem’
_mysql.c:397: 警告:语句不起作用
_mysql.c:398: 警告:隐式声明函数‘Py_DECREF’
_mysql.c:400: 警告:隐式声明函数‘PyErr_Clear’
_mysql.c:401: 错误:‘Py_None’未声明(在此函数内第一次使用)
_mysql.c:401: 警告:语句不起作用
_mysql.c:404: 警告:隐式声明函数‘PySequence_Check’
_mysql.c:405: 警告:隐式声明函数‘PySequence_Size’
_mysql.c:406: 错误:‘fun2’未声明(在此函数内第一次使用)
_mysql.c:406: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:406: 警告:语句不起作用
_mysql.c:408: 错误:‘t’未声明(在此函数内第一次使用)
_mysql.c:408: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:408: 警告:隐式声明函数‘PySequence_GetItem’
_mysql.c:408: 警告:语句不起作用
_mysql.c:410: 警告:隐式声明函数‘PyTuple_Check’
_mysql.c:411: 警告:隐式声明函数‘PyTuple_GET_SIZE’
_mysql.c:413: 错误:‘pmask’未声明(在此函数内第一次使用)
_mysql.c:413: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:413: 警告:语句不起作用
_mysql.c:414: 警告:隐式声明函数‘PyTuple_GET_ITEM’
_mysql.c:414: 警告:语句不起作用
_mysql.c:415: 警告:语句不起作用
_mysql.c:416: 警告:隐式声明函数‘PyInt_Check’
_mysql.c:417: 警告:隐式声明函数‘PyInt_AS_LONG’
_mysql.c:433: 警告:语句不起作用
_mysql.c:436: 警告:语句不起作用
_mysql.c:438: 警告:隐式声明函数‘PyTuple_SET_ITEM’
_mysql.c:438: 错误:‘_mysql_ResultObject’没有名为‘converter’的成员
_mysql.c: 在函数‘_mysql_ResultObject_clear’中:
_mysql.c:462: 警告:隐式声明函数‘Py_XDECREF’
_mysql.c:462: 错误:‘_mysql_ResultObject’没有名为‘converter’的成员
_mysql.c:463: 错误:‘_mysql_ResultObject’没有名为‘converter’的成员
_mysql.c:463: 错误:‘NULL’未声明(在此函数内第一次使用)
_mysql.c:463: 警告:语句不起作用
_mysql.c:464: 错误:‘_mysql_ResultObject’没有名为‘conn’的成员
_mysql.c:465: 错误:‘_mysql_ResultObject’没有名为‘conn’的成员
_mysql.c:465: 警告:语句不起作用
_mysql.c: 在文件层:
_mysql.c:472: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c:473: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: 在函数‘_mysql_ConnectionObject_Initialize’中:
_mysql.c:475: 错误:‘NULL’未声明(在此函数内第一次使用)
_mysql.c:475: 警告:从不兼容的指针类型初始化
_mysql.c:476: 错误:‘PyObject’未声明(在此函数内第一次使用)
_mysql.c:476: 错误:‘conv’未声明(在此函数内第一次使用)
_mysql.c:476: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:476: 警告:语句不起作用
_mysql.c:477: 错误:‘ssl’未声明(在此函数内第一次使用)
_mysql.c:477: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:477: 警告:语句不起作用
_mysql.c:479: 警告:从不兼容的指针类型初始化
_mysql.c:479: 警告:从不兼容的指针类型初始化
_mysql.c:479: 警告:从不兼容的指针类型初始化
_mysql.c:480: 警告:从不兼容的指针类型初始化
_mysql.c:480: 警告:从不兼容的指针类型初始化
_mysql.c:482: 警告:从不兼容的指针类型初始化
_mysql.c:482: 警告:从不兼容的指针类型初始化
_mysql.c:482: 警告:从不兼容的指针类型初始化
_mysql.c:483: 警告:从不兼容的指针类型初始化
_mysql.c:483: 警告:从不兼容的指针类型初始化
_mysql.c:493: 错误:初始值设定元素不是常量
_mysql.c:493: 错误:(在‘kwlist[16]’的初始化附近)
_mysql.c:496: 警告:从不兼容的指针类型初始化
_mysql.c:497: 警告:从不兼容的指针类型初始化
_mysql.c:498: 警告:从不兼容的指针类型初始化
_mysql.c:500: 错误:‘_mysql_ConnectionObject’没有名为‘converter’的成员
_mysql.c:500: 警告:语句不起作用
_mysql.c:501: 错误:‘_mysql_ConnectionObject’没有名为‘open’的成员
_mysql.c:501: 警告:语句不起作用
_mysql.c:502: 警告:隐式声明函数‘_mysql_Exception’
_mysql.c:503: 错误:‘args’未声明(在此函数内第一次使用)
_mysql.c:503: 错误:‘kwargs’未声明(在此函数内第一次使用)
_mysql.c:523: 错误:‘value’未声明(在此函数内第一次使用)
_mysql.c:523: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:523: 警告:语句不起作用
_mysql.c:524: 警告:隐式声明函数‘PyMapping_GetItemString’
_mysql.c:524: 警告:语句不起作用
_mysql.c:524: 警告:隐式声明函数‘PyString_AsString’
_mysql.c:524: 警告:赋值时将整数赋给指针,未作类型转换
_mysql.c:525: 警告:语句不起作用
_mysql.c:525: 警告:赋值时将整数赋给指针,未作类型转换
_mysql.c:526: 警告:语句不起作用
_mysql.c:526: 警告:赋值时将整数赋给指针,未作类型转换
_mysql.c:527: 警告:语句不起作用
_mysql.c:527: 警告:赋值时将整数赋给指针,未作类型转换
_mysql.c:528: 警告:语句不起作用
_mysql.c:528: 警告:赋值时将整数赋给指针,未作类型转换
_mysql.c:536: 错误:‘Py_BEGIN_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:536: 警告:语句不起作用
_mysql.c:537: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:537: 警告:传递‘mysql_init’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:437: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:540: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:541: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:544: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:544: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:548: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:548: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:549: 警告:比较不相关的指针时缺少类型转换
_mysql.c:550: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:550: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:551: 警告:比较不相关的指针时缺少类型转换
_mysql.c:552: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:552: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:553: 警告:比较不相关的指针时缺少类型转换
_mysql.c:554: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:554: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:557: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:557: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:561: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:562: 警告:传递‘mysql_ssl_set’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:438: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:565: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:566: 警告:传递‘mysql_real_connect’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:444: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:568: 错误:‘Py_END_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:568: 警告:语句不起作用
_mysql.c:577: 警告:语句不起作用
_mysql.c:583: 错误:‘_mysql_ConnectionObject’没有名为‘converter’的成员
_mysql.c:583: 警告:语句不起作用
_mysql.c:591: 错误:‘_mysql_ConnectionObject’没有名为‘open’的成员
_mysql.c:591: 警告:语句不起作用
_mysql.c: 在文件层:
_mysql.c:649: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c: 在函数‘_mysql_ConnectionObject_clear’中:
_mysql.c:681: 错误:‘_mysql_ConnectionObject’没有名为‘converter’的成员
_mysql.c:682: 错误:‘_mysql_ConnectionObject’没有名为‘converter’的成员
_mysql.c:682: 错误:‘NULL’未声明(在此函数内第一次使用)
_mysql.c:682: 警告:语句不起作用
_mysql.c: 在文件层:
_mysql.c:689: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:717: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:733: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:751: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:770: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:796: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:818: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:850: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:876: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:903: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:918: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:935: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:951: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:969: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1004: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1035: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1037: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1067: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1097: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1131: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1163: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1199: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1223: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1248: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1273: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1312: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1351: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1356: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c:1359: 错误:expected declaration specifiers or ‘...’ before ‘_PYFUNC’
_mysql.c: 在函数‘_mysql__fetch_row’中:
_mysql.c:1365: 错误:‘PyObject’未声明(在此函数内第一次使用)
_mysql.c:1365: 错误:‘v’未声明(在此函数内第一次使用)
_mysql.c:1365: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:1365: 警告:语句不起作用
_mysql.c:1366: 错误:‘_mysql_ResultObject’没有名为‘use’的成员
_mysql.c:1367: 错误:‘_mysql_ResultObject’没有名为‘result’的成员
_mysql.c:1367: 警告:传递‘mysql_fetch_row’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:552: 附注:需要类型‘struct MYSQL_RES *’,但实参的类型为‘char **’
_mysql.c:1369: 错误:‘Py_BEGIN_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:1369: 警告:语句不起作用
_mysql.c:1370: 错误:‘_mysql_ResultObject’没有名为‘result’的成员
_mysql.c:1370: 警告:传递‘mysql_fetch_row’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:552: 附注:需要类型‘struct MYSQL_RES *’,但实参的类型为‘char **’
_mysql.c:1371: 错误:‘Py_END_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:1371: 警告:语句不起作用
_mysql.c:1373: 错误:‘_mysql_ResultObject’没有名为‘conn’的成员
_mysql.c:1373: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:1373: 警告:传递‘mysql_errno’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:428: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:1374: 错误:‘_mysql_ResultObject’没有名为‘conn’的成员
_mysql.c:1378: 警告:隐式声明函数‘_PyTuple_Resize’
_mysql.c:1378: 错误:‘r’未声明(在此函数内第一次使用)
_mysql.c:1381: 警告:隐式声明函数‘convert_row’
_mysql.c:1381: 警告:语句不起作用
_mysql.c: 在文件层:
_mysql.c:1399: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1478: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1506: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1528: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1568: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1597: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1612: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1627: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1642: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1658: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1693: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1711: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1734: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1751: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1767: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1796: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1819: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1849: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1871: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1898: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1919: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1960: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1980: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c: 在函数‘_mysql_ConnectionObject_dealloc’中:
_mysql.c:2014: 错误:‘PyObject’未声明(在此函数内第一次使用)
_mysql.c:2014: 错误:‘o’未声明(在此函数内第一次使用)
_mysql.c:2014: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:2014: 警告:语句不起作用
_mysql.c:2017: 错误:‘_mysql_ConnectionObject’没有名为‘open’的成员
_mysql.c:2018: 警告:隐式声明函数‘_mysql_ConnectionObject_close’
_mysql.c:2018: 错误:‘NULL’未声明(在此函数内第一次使用)
_mysql.c:2018: 警告:语句不起作用
_mysql.c:2021: 警告:隐式声明函数‘PyMem_Free’
_mysql.c: 在文件层:
_mysql.c:2024: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2041: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2056: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2078: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c: 在函数‘_mysql_ResultObject_dealloc’中:
_mysql.c:2100: 错误:‘_mysql_ResultObject’没有名为‘result’的成员
_mysql.c:2100: 警告:传递‘mysql_free_result’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:545: 附注:需要类型‘struct MYSQL_RES *’,但实参的类型为‘char **’
_mysql.c: 在文件层:
_mysql.c:2105: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2115: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_methods’
_mysql.c:2330: 错误:数组元素的类型不完全
_mysql.c:2331: 错误:‘T_INT’未声明(不在函数内)
_mysql.c:2331: 警告:隐式声明函数‘offsetof’
_mysql.c:2331: 错误:expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2331: 错误:‘RO’未声明(不在函数内)
_mysql.c:2338: 错误:‘T_OBJECT’未声明(不在函数内)
_mysql.c:2338: 错误:expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2345: 错误:‘T_UINT’未声明(不在函数内)
_mysql.c:2345: 错误:expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2352: 错误:expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2359: 错误:expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2366: 错误:‘NULL’未声明(不在函数内)
_mysql.c:2369: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_methods’
_mysql.c:2421: 错误:数组元素的类型不完全
_mysql.c:2422: 错误:expected expression before ‘_mysql_ResultObject’
_mysql.c:2432: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2460: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2490: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: 在函数‘_mysql_ConnectionObject_setattr’中:
_mysql.c:2492: 错误:‘v’未声明(在此函数内第一次使用)
_mysql.c:2493: 警告:隐式声明函数‘PyErr_SetString’
_mysql.c:2493: 错误:‘PyExc_AttributeError’未声明(在此函数内第一次使用)
_mysql.c:2498: 警告:隐式声明函数‘PyMember_Set’
_mysql.c: 在文件层:
_mysql.c:2515: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: 在函数‘_mysql_ResultObject_setattr’中:
_mysql.c:2517: 错误:‘v’未声明(在此函数内第一次使用)
_mysql.c:2518: 错误:‘PyExc_AttributeError’未声明(在此函数内第一次使用)
_mysql.c: 在文件层:
_mysql.c:2536: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_Type’
_mysql.c:2620: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_Type’
_mysql.c:2706: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_methods’
_mysql.c:2778: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2810: 警告:返回类型默认为‘int’
_mysql.c: 在函数‘DL_EXPORT’中:
_mysql.c:2810: 错误:expected declaration specifiers before ‘init_mysql’
_mysql.c:2888: 错误:expected ‘{’ at end of input
error: command 'gcc' failed with exit status 1
python2.6.6安装MySQL-python模块正确方法的更多相关文章
- Python安装MySQL数据库模块
背景 折腾: [记录]使用Python操作MySQL数据库 的过程中,需要去安装MySQLdb. 下载MySQLdb 去官网: http://pypi.python.org/pypi/MySQL-py ...
- 安装ANSYS19.0的正确方法(附下载)
安装ANSYS19.0的正确方法 卸载干净旧版本ANSYS 安装或重新安装之前必须先卸载干净,安装过旧版本ANSYS的也要确保卸载干净.电脑环境准备参考以下内容 ANSYS 卸载后重装需要注意的问题_ ...
- 详解Python模块导入方法
python常被昵称为胶水语言,它能很轻松的把用其他语言制作的各种模块(尤其是C/C++)轻松联结在一起.python包含子目录中的模块方法比较简单,关键是能够在sys.path里面找到通向模块文件的 ...
- BayaiM__Linux安装MySQL的两种方法
BayaiM__Linux安装MySQL的两种方法 < 以下内容,纯属抄袭,如有雷同,爱咋咋地 > 阅读(21210) | 评论(4340) | 转发(5660) | 删除 编辑 ...
- 安装第三方Python模块,增加InfoPi的健壮性
这3个第三方Python模块是可选的,不安装的话InfoPi也可以运行. 但是如果安装了,会增加InfoPi的健壮性. 目录 1.cchardet 自动检测文本编码 2.lxml 用于解析 ...
- 双击更新所有已安装的python模块
首先声明我是一个升级控.几乎每天会查看一下手机.电脑是否有新的应用需要更新. 同样,我的python模块也是这样.百度了一下,发现目前还没有人将更新所有模块做成一件命令,但是查到了指引,主要就是两个 ...
- windows 上安装冷门python模块
最近在逼乎看到 笑虎大大 的python 撸代码学知识专栏..就下载他的Pspider 框架 安装了一下,准备耍耍. 由于是在Windows下的pycharm 有个 pybloom_live 模块 老 ...
- linux下安装mysql的三种方法:rpm包安装、yum安装、源码包安装
1 安装MySQL数据库服务器安装方法一://查询系统自带的数据库rpm -qa | grep -i mysql //卸载查询到的所有mysqlrpm -e --nodeps mysql-libs-5 ...
- c#项目调用Python模块的方法
将Python模块用pyinstaller打包成exe程序 下载安装UPX((http://upx.sourceforge.net/)) ,并把路径加到环境变量中. UPX是开源的加壳和压缩exe的程 ...
随机推荐
- C语言-表达式
表达式是使用运算符连接起来的式子,C语言中的表达式有以下几种: 1.算数运算符 + - * / % 2.赋值运算符 += -= *= /= %= 3.自增.自减 ++ -- a++为先 ...
- scrapy setting 备注
scrapy 脚本里面设置输出文件: process = CrawlerProcess(settings) process.settings.set('FEED_URI', 'wangyi.csv', ...
- IM 之 融云
官方网站:http://www.rongcloud.cn 官方开发文档:http://www.rongcloud.cn/docs/ IM 融云 之 开发基础概念 IM 融云 之 通讯能力库API IM ...
- 最简化模型2——css3分阶段动画效果(经过实测)之转动的div
@keyframes mymove{ 0%{top: 0;left: 0;transform:rotate(50deg);} 10%{top: 100px;left: 50px;trans ...
- SQLite存储区的日志模式
目录内包含了三个文件xxx.sqlite.xxx.sqlite-shm.xxx.sqlite-wal 默认的日志模式为Write-Ahead Logging(WAL): 支持多个并发读取和一个并发写入 ...
- php中cookie实现二级域名可访问操作的方法
本文实例讲述了php中cookie实现二级域名可访问操作的方法.分享给大家供大家参考.具体方法如下: cookie在一些应用中很常用,假设我有一个多级域名要求可以同时访问主域名绑定的cookie,下面 ...
- 网格视图(GridView)功能和用法
GridView用于在界面上按行.列分布的方式来显示多个组件.GridView和ListView有共同的父类:AbsListView,因此GridView和ListView具有很高的相似性,它们都是列 ...
- 如何使excel表格的内容自动添加前缀
一.假设是要在一列的单元格内容前加上固定的内容,则 方法一在原单元格实现,分两种情况 如果原单元格的内容是数字内容,要在原数字前添加"ABC"这样的前缀则选中这些单元格----右键 ...
- MyBatis 一级、二级缓存
一级 默认session就有一级缓存,session有C/U/D操作或者session.clearCache();session.commit();都会清空缓存: 二级在mapper.xml中添加&l ...
- 小谈JavaScript中this的用法
"this"关键字是JavaScript中广泛应用的一种特性,但它经常也是这门语言中最容易混淆和误解的特性.那么"this"的实际意义是什么?它是如何求值的? ...