views:

519

answers:

5

I have a Fedora 11 box with MySQL server. Fedora 11 uses python 2.6 internally and python 2.6 is automatically installed on the box. I have created a python virtual-env for version 2.5.5, so that I can run turbogears 1.x application. I have MySQLdb rpm installed on the box (and it works fine with python 2.6).

When I import MySQLdb from within python version 2.6 it imports is successfully. When I import MySQLdb from within the python 2.5.5 virtual-env the import fails (because I have installed virtual-env with --no-site-packages). So, I have to install MySQLdb python as a local package (local to virtual-env).

'easy_install MySQL-python' within the virtual env fails. It downloads the MySQL-python-1.2.3.c1.tar.gz/download, but the 'python setup.py build' fails with error. The same problem occurs when building the MySQL outside of virtual-env.

Is the 'python setup.py build' for MySQL-python trying to link to a library (and am I missing some library)? Or is the downloaded code missing some header files (unlikely)?

Thanks.

A: 

Thank you for responding. [I am new to stackoverflow, and am not allowed to post more than 1 hyperlink, so I am going to try munging the URLs].

(tg11env)[user@localhost tg11env]$ easy_install MySQL-python > install.log 2>&1

Searching for MySQL-python Reading http: //pypi.python.org/simple/MySQL-python/ Reading http: //sourceforge.net/projects/mysql-python Best match: MySQL-python 1.2.3c1 Downloading http: //sourceforge.net/projects/mysql-python/files/mysql-python-test/1.2.3c1/MySQL-python-1.2.3c1.tar.gz/download Processing MySQL-python-1.2.3c1.tar.gz Running MySQL-python-1.2.3c1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-6CY7a4/MySQL-python-1.2.3c1/egg-dist-tmp-QnLenV _mysql.c:36:23: error: my_config.h: No such file or directory _mysql.c:38:19: error: mysql.h: No such file or directory _mysql.c:39:26: error: mysqld_error.h: No such file or directory _mysql.c:40:20: error: errmsg.h: No such file or directory _mysql.c:76: error: expected specifier-qualifier-list before âMYSQLâ _mysql.c:90: error: expected specifier-qualifier-list before âMYSQL_RESâ _mysql.c: In function â_mysql_Exceptionâ: _mysql.c:120: warning: implicit declaration of function âmysql_errnoâ _mysql.c:120: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:123: error: âCR_MAX_ERRORâ undeclared (first use in this function) _mysql.c:123: error: (Each undeclared identifier is reported only once _mysql.c:123: error: for each function it appears in.) _mysql.c:131: error: âCR_COMMANDS_OUT_OF_SYNCâ undeclared (first use in this function) _mysql.c:132: error: âER_DB_CREATE_EXISTSâ undeclared (first use in this function) _mysql.c:133: error: âER_SYNTAX_ERRORâ undeclared (first use in this function) _mysql.c:134: error: âER_PARSE_ERRORâ undeclared (first use in this function) _mysql.c:135: error: âER_NO_SUCH_TABLEâ undeclared (first use in this function) _mysql.c:136: error: âER_WRONG_DB_NAMEâ undeclared (first use in this function) _mysql.c:137: error: âER_WRONG_TABLE_NAMEâ undeclared (first use in this function) _mysql.c:138: error: âER_FIELD_SPECIFIED_TWICEâ undeclared (first use in this function) _mysql.c:139: error: âER_INVALID_GROUP_FUNC_USEâ undeclared (first use in this function) _mysql.c:140: error: âER_UNSUPPORTED_EXTENSIONâ undeclared (first use in this function) _mysql.c:141: error: âER_TABLE_MUST_HAVE_COLUMNSâ undeclared (first use in this function) _mysql.c:170: error: âER_DUP_ENTRYâ undeclared (first use in this function) _mysql.c:213: warning: implicit declaration of function âmysql_errorâ _mysql.c:213: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:213: warning: passing argument 1 of âPyString_FromStringâ makes pointer from integer without a cast /raid5/arun/altpython/local/include/python2.5/stringobject.h:62: note: expected âconst char *â but argument is of type âintâ _mysql.c: In function â_mysql_server_initâ: _mysql.c:308: warning: label âfinishâ defined but not used _mysql.c:234: warning: unused variable âitemâ _mysql.c:233: warning: unused variable âgroupcâ _mysql.c:233: warning: unused variable âiâ _mysql.c:233: warning: unused variable âcmd_argcâ _mysql.c:232: warning: unused variable âsâ _mysql.c: In function â_mysql_ResultObject_Initializeâ: _mysql.c:363: error: âMYSQL_RESâ undeclared (first use in this function) _mysql.c:363: error: âresultâ undeclared (first use in this function) _mysql.c:368: error: âMYSQL_FIELDâ undeclared (first use in this function) _mysql.c:368: error: âfieldsâ undeclared (first use in this function) _mysql.c:377: error: â_mysql_ResultObjectâ has no member named âuseâ _mysql.c:380: warning: implicit declaration of function âmysql_use_resultâ _mysql.c:380: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:382: warning: implicit declaration of function âmysql_store_resultâ _mysql.c:382: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:383: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:386: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:389: warning: implicit declaration of function âmysql_num_fieldsâ _mysql.c:390: error: â_mysql_ResultObjectâ has no member named ânfieldsâ _mysql.c:391: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:392: warning: implicit declaration of function âmysql_fetch_fieldsâ _mysql.c:438: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c: In function â_mysql_ResultObject_traverseâ: _mysql.c:450: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:451: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c: In function â_mysql_ResultObject_clearâ: _mysql.c:462: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:462: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:462: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:462: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:463: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c: In function â_mysql_ConnectionObject_Initializeâ: _mysql.c:475: error: âMYSQLâ undeclared (first use in this function) _mysql.c:475: error: âconnâ undeclared (first use in this function) _mysql.c:500: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:501: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:525: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:547: warning: implicit declaration of function âmysql_initâ _mysql.c:547: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:550: warning: implicit declaration of function âmysql_optionsâ _mysql.c:550: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:550: error: âMYSQL_OPT_CONNECT_TIMEOUTâ undeclared (first use in this function) _mysql.c:554: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:554: error: âMYSQL_OPT_COMPRESSâ undeclared (first use in this function) _mysql.c:555: error: âCLIENT_COMPRESSâ undeclared (first use in this function) _mysql.c:558: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:558: error: âMYSQL_OPT_NAMED_PIPEâ undeclared (first use in this function) _mysql.c:560: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:560: error: âMYSQL_INIT_COMMANDâ undeclared (first use in this function) _mysql.c:562: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:562: error: âMYSQL_READ_DEFAULT_FILEâ undeclared (first use in this function) _mysql.c:564: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:564: error: âMYSQL_READ_DEFAULT_GROUPâ undeclared (first use in this function) _mysql.c:567: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:567: error: âMYSQL_OPT_LOCAL_INFILEâ undeclared (first use in this function) _mysql.c:575: warning: implicit declaration of function âmysql_real_connectâ _mysql.c:575: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:590: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c: In function â_mysql_ConnectionObject_traverseâ: _mysql.c:671: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:672: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c: In function â_mysql_ConnectionObject_clearâ: _mysql.c:680: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:680: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:680: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:680: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:681: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c: In function â_mysql_ConnectionObject_closeâ: _mysql.c:696: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:698: warning: implicit declaration of function âmysql_closeâ _mysql.c:698: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:700: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c: In function â_mysql_ConnectionObject_affected_rowsâ: _mysql.c:722: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:723: warning: implicit declaration of function âmysql_affected_rowsâ _mysql.c:723: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_debugâ: _mysql.c:739: warning: implicit declaration of function âmysql_debugâ _mysql.c: In function â_mysql_ConnectionObject_dump_debug_infoâ: _mysql.c:757: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:759: warning: implicit declaration of function âmysql_dump_debug_infoâ _mysql.c:759: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_autocommitâ: _mysql.c:783: warning: implicit declaration of function âmysql_queryâ _mysql.c:783: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_commitâ: _mysql.c:806: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_rollbackâ: _mysql.c:828: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_errnoâ: _mysql.c:940: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:941: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_errorâ: _mysql.c:956: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:957: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:957: warning: passing argument 1 of âPyString_FromStringâ makes pointer from integer without a cast /raid5/arun/altpython/local/include/python2.5/stringobject.h:62: note: expected âconst char *â but argument is of type âintâ _mysql.c: In function â_mysql_escape_stringâ: _mysql.c:981: warning: implicit declaration of function âmysql_escape_stringâ _mysql.c: In function â_mysql_escapeâ: _mysql.c:1088: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c: In function â_mysql_ResultObject_describeâ: _mysql.c:1168: error: âMYSQL_FIELDâ undeclared (first use in this function) _mysql.c:1168: error: âfieldsâ undeclared (first use in this function) _mysql.c:1171: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1172: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1173: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1184: warning: implicit declaration of function âIS_NOT_NULLâ _mysql.c: In function â_mysql_ResultObject_field_flagsâ: _mysql.c:1204: error: âMYSQL_FIELDâ undeclared (first use in this function) _mysql.c:1204: error: âfieldsâ undeclared (first use in this function) _mysql.c:1207: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1208: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1209: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: At top level: _mysql.c:1250: error: expected declaration specifiers or â...â before âMYSQL_ROWâ _mysql.c: In function â_mysql_row_to_tupleâ: _mysql.c:1256: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1258: warning: implicit declaration of function âmysql_fetch_lengthsâ _mysql.c:1258: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1258: warning: assignment makes pointer from integer without a cast _mysql.c:1261: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:1262: error: ârowâ undeclared (first use in this function) _mysql.c: At top level: _mysql.c:1275: error: expected declaration specifiers or â...â before âMYSQL_ROWâ _mysql.c: In function â_mysql_row_to_dictâ: _mysql.c:1280: error: âMYSQL_FIELDâ undeclared (first use in this function) _mysql.c:1280: error: âfieldsâ undeclared (first use in this function) _mysql.c:1282: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1284: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1284: warning: assignment makes pointer from integer without a cast _mysql.c:1285: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1288: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:1289: error: ârowâ undeclared (first use in this function) _mysql.c: At top level: _mysql.c:1314: error: expected declaration specifiers or â...â before âMYSQL_ROWâ _mysql.c: In function â_mysql_row_to_dict_oldâ: _mysql.c:1319: error: âMYSQL_FIELDâ undeclared (first use in this function) _mysql.c:1319: error: âfieldsâ undeclared (first use in this function) _mysql.c:1321: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1323: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1323: warning: assignment makes pointer from integer without a cast _mysql.c:1324: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1327: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:1328: error: ârowâ undeclared (first use in this function) _mysql.c: At top level: _mysql.c:1350: error: expected declaration specifiers or â...â before âMYSQL_ROWâ _mysql.c: In function â_mysql__fetch_rowâ: _mysql.c:1361: error: âMYSQL_ROWâ undeclared (first use in this function) _mysql.c:1361: error: expected â;â before ârowâ _mysql.c:1365: error: â_mysql_ResultObjectâ has no member named âuseâ _mysql.c:1366: error: ârowâ undeclared (first use in this function) _mysql.c:1366: warning: implicit declaration of function âmysql_fetch_rowâ _mysql.c:1366: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1369: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:1372: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:1380: error: too many arguments to function âconvert_rowâ _mysql.c: In function â_mysql_ResultObject_fetch_rowâ: _mysql.c:1404: error: expected declaration specifiers or â...â before âMYSQL_ROWâ _mysql.c:1419: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1431: error: â_mysql_ResultObjectâ has no member named âuseâ _mysql.c:1445: warning: implicit declaration of function âmysql_num_rowsâ _mysql.c:1445: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ConnectionObject_character_set_nameâ: _mysql.c:1512: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c: In function â_mysql_get_client_infoâ: _mysql.c:1603: warning: implicit declaration of function âmysql_get_client_infoâ _mysql.c:1603: warning: passing argument 1 of âPyString_FromStringâ makes pointer from integer without a cast /raid5/arun/altpython/local/include/python2.5/stringobject.h:62: note: expected âconst char *â but argument is of type âintâ _mysql.c: In function â_mysql_ConnectionObject_get_host_infoâ: _mysql.c:1617: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1618: warning: implicit declaration of function âmysql_get_host_infoâ _mysql.c:1618: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:1618: warning: passing argument 1 of âPyString_FromStringâ makes pointer from integer without a cast /raid5/arun/altpython/local/include/python2.5/stringobject.h:62: note: expected âconst char *â but argument is of type âintâ _mysql.c: In function â_mysql_ConnectionObject_get_proto_infoâ: _mysql.c:1632: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1633: warning: implicit declaration of function âmysql_get_proto_infoâ _mysql.c:1633: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_get_server_infoâ: _mysql.c:1647: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1648: warning: implicit declaration of function âmysql_get_server_infoâ _mysql.c:1648: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:1648: warning: passing argument 1 of âPyString_FromStringâ makes pointer from integer without a cast /raid5/arun/altpython/local/include/python2.5/stringobject.h:62: note: expected âconst char *â but argument is of type âintâ _mysql.c: In function â_mysql_ConnectionObject_infoâ: _mysql.c:1664: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1665: warning: implicit declaration of function âmysql_infoâ _mysql.c:1665: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:1665: warning: assignment makes pointer from integer without a cast _mysql.c: In function â_mysql_ConnectionObject_insert_idâ: _mysql.c:1697: error: âmy_ulonglongâ undeclared (first use in this function) _mysql.c:1697: error: expected â;â before ârâ _mysql.c:1699: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1701: error: ârâ undeclared (first use in this function) _mysql.c:1701: warning: implicit declaration of function âmysql_insert_idâ _mysql.c:1701: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_killâ: _mysql.c:1718: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1720: warning: implicit declaration of function âmysql_killâ _mysql.c:1720: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_field_countâ: _mysql.c:1739: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1741: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ResultObject_num_fieldsâ: _mysql.c:1756: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1757: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ResultObject_num_rowsâ: _mysql.c:1772: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1773: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ConnectionObject_pingâ: _mysql.c:1802: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1803: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:1805: warning: implicit declaration of function âmysql_pingâ _mysql.c:1805: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_queryâ: _mysql.c:1826: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1828: warning: implicit declaration of function âmysql_real_queryâ _mysql.c:1828: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_select_dbâ: _mysql.c:1856: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1858: warning: implicit declaration of function âmysql_select_dbâ _mysql.c:1858: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_shutdownâ: _mysql.c:1877: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1879: warning: implicit declaration of function âmysql_shutdownâ _mysql.c:1879: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_statâ: _mysql.c:1904: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1906: warning: implicit declaration of function âmysql_statâ _mysql.c:1906: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:1906: warning: assignment makes pointer from integer without a cast _mysql.c: In function â_mysql_ConnectionObject_store_resultâ: _mysql.c:1927: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1928: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:1937: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ConnectionObject_thread_idâ: _mysql.c:1966: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1968: warning: implicit declaration of function âmysql_thread_idâ _mysql.c:1968: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_use_resultâ: _mysql.c:1988: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1989: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:1998: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ConnectionObject_deallocâ: _mysql.c:2016: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c: In function â_mysql_ConnectionObject_reprâ: _mysql.c:2028: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:2030: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ResultObject_data_seekâ: _mysql.c:2047: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:2048: warning: implicit declaration of function âmysql_data_seekâ _mysql.c:2048: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ResultObject_row_seekâ: _mysql.c:2061: error: âMYSQL_ROW_OFFSETâ undeclared (first use in this function) _mysql.c:2061: error: expected â;â before ârâ _mysql.c:2063: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:2064: error: â_mysql_ResultObjectâ has no member named âuseâ _mysql.c:2069: error: ârâ undeclared (first use in this function) _mysql.c:2069: warning: implicit declaration of function âmysql_row_tellâ _mysql.c:2069: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:2070: warning: implicit declaration of function âmysql_row_seekâ _mysql.c:2070: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ResultObject_row_tellâ: _mysql.c:2082: error: âMYSQL_ROW_OFFSETâ undeclared (first use in this function) _mysql.c:2082: error: expected â;â before ârâ _mysql.c:2084: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:2085: error: â_mysql_ResultObjectâ has no member named âuseâ _mysql.c:2090: error: ârâ undeclared (first use in this function) _mysql.c:2090: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:2091: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ResultObject_deallocâ: _mysql.c:2099: warning: implicit declaration of function âmysql_free_resultâ _mysql.c:2099: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: At top level: _mysql.c:2330: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:2337: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:2344: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:2351: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:2358: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:2421: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:2421: error: initializer element is not constant _mysql.c:2421: error: (near initialization for â_mysql_ResultObject_memberlist[0].offsetâ) _mysql.c: In function â_mysql_ConnectionObject_getattrâ: _mysql.c:2443: error: â_mysql_ConnectionObjectâ has no member named âopenâ error: Setup script exited with error: command 'gcc' failed with exit status 1

wizard
+2  A: 
_mysql.c:36:23: error: my_config.h: No such file or directory
_mysql.c:38:19: error: mysql.h: No such file or directory
_mysql.c:39:26: error: mysqld_error.h: No such file or directory
_mysql.c:40:20: error: errmsg.h: No such file or directory

Please install MySQL header files, probably here

S.Mark
A: 

Re-post (Hoping this is preserves the linefeeds). It seems the compilation fails since it cannot find the header files. Thanks!

Searching for MySQL-python

Reading http: //pypi.python.org/simple/MySQL-python/

Reading http: //sourceforge.net/projects/mysql-python

Best match: MySQL-python 1.2.3c1

Downloading http: //sourceforge.net/projects/mysql-python/files/mysql-python-test/1.2.3c1/MySQL-python-1.2.3c1.tar.gz/download

Processing MySQL-python-1.2.3c1.tar.gz

Running MySQL-python-1.2.3c1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-6CY7a4/MySQL-python-1.2.3c1/egg-dist-tmp-QnLenV

_mysql.c:36:23: error: my_config.h: No such file or directory

_mysql.c:38:19: error: mysql.h: No such file or directory

_mysql.c:39:26: error: mysqld_error.h: No such file or directory

_mysql.c:40:20: error: errmsg.h: No such file or directory

_mysql.c:76: error: expected specifier-qualifier-list before MYSQL

_mysql.c:90: error: expected specifier-qualifier-list before MYSQL_RES

_mysql.c: In function _mysql_Exception:

_mysql.c:120: warning: implicit declaration of function mysql_errno

_mysql.c:120: error: _mysql_ConnectionObject has no member named connection

_mysql.c:123: error: CR_MAX_ERROR undeclared (first use in this function)

_mysql.c:123: error: (Each undeclared identifier is reported only once

_mysql.c:123: error: for each function it appears in.)

.... ....

wizard
A: 

S.Mark,

If I were to install MySQL header files, would they mess with the existing rpms?

[Sorry, for being redundant. In essence, MySQL is functional on the machine, MySQL-python is functional for python 2.6, but MySQL-python is not functional from virtualenv for python 2.5.5.]

Thank you for trying to help.

rpm -qa | grep -i mysql

MySQL-python-1.2.3-0.4.c1.fc11.x86_64

perl-DBD-MySQL-4.010-1.fc11.x86_64

mysql-libs-5.1.42-7.fc11.x86_64

mysql-5.1.42-7.fc11.x86_64

php-mysql-5.2.12-1.fc11.x86_64

mysql-server-5.1.42-7.fc11.x86_64

wizard
A: 

Works! Thanks for all your help.

I installed mysql-devel package (yum install mysql-devel) on the box.

Then did easy_install MySQL-python from within virtual-env (python 2.5.5), and the compilation/installation was successful (with some warnings).

Thanks.

wizard
glad it worked. you should give those that helped you some +1 karma, it's the stackoverflow way. :)
Tom Willis