virtualenv gcc error MySQL-python

Sto cercando di installare MySQL-python tramite PuTTY con virtualenv.

Specifiche.
* CentOS-6.0
* python2.6

Quindi ho letto molti siti e la cosa più grande che vedo è python-dev e python-devel (anche se non so la differenza). Non riesco a far installare questi programmi, Sudo, yum, easy_install e pip sono quelli che ho provato. Non sono l'amministratore di questo server in modo da sudo e yum non posso eseguire. Ho avuto l'amministratore di provare ad installare, sia in, server dist. di python e il mio virtualenv. Entrambi dicono che non c'è niente da fare. Ecco l'errore che ottengo quando si tenta di installare MySQL-python-1.2.3

_mysql.c:1928: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1929: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:1938: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ConnectionObject_thread_idâ: _mysql.c:1967: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1969: warning: implicit declaration of function âmysql_thread_idâ _mysql.c:1969: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ConnectionObject_use_resultâ: _mysql.c:1989: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:1990: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:1999: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ConnectionObject_deallocâ: _mysql.c:2017: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c: In function â_mysql_ConnectionObject_reprâ: _mysql.c:2029: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:2031: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c: In function â_mysql_ResultObject_data_seekâ: _mysql.c:2048: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:2049: warning: implicit declaration of function âmysql_data_seekâ _mysql.c:2049: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ResultObject_row_seekâ: _mysql.c:2062: error: âMYSQL_ROW_OFFSETâ undeclared (first use in this function) _mysql.c:2062: error: expected â;â before ârâ _mysql.c:2064: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:2065: error: â_mysql_ResultObjectâ has no member named âuseâ _mysql.c:2070: error: ârâ undeclared (first use in this function) _mysql.c:2070: warning: implicit declaration of function âmysql_row_tellâ _mysql.c:2070: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:2071: warning: implicit declaration of function âmysql_row_seekâ _mysql.c:2071: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ResultObject_row_tellâ: _mysql.c:2083: error: âMYSQL_ROW_OFFSETâ undeclared (first use in this function) _mysql.c:2083: error: expected â;â before ârâ _mysql.c:2085: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:2086: error: â_mysql_ResultObjectâ has no member named âuseâ _mysql.c:2091: error: ârâ undeclared (first use in this function) _mysql.c:2091: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c:2092: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: In function â_mysql_ResultObject_deallocâ: _mysql.c:2100: warning: implicit declaration of function âmysql_free_resultâ _mysql.c:2100: error: â_mysql_ResultObjectâ has no member named âresultâ _mysql.c: At top level: _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: In function â_mysql_ConnectionObject_getattrâ: _mysql.c:2444: error: â_mysql_ConnectionObjectâ has no member named âopenâ error: command 'gcc' failed with exit status 1 

Mi dispiace non posso get l'integer errore su PuTTY

One Solution collect form web for “virtualenv gcc error MySQL-python”

Il file README situato all'interno della fonte di mysql-python indica i Prerequisiti:

  • Python 2.3.4 o superiore
  • setuptools
  • MySQL 3.23.32 o superiore (con molte stipulazioni che non pubblicherò)
  • mysql-devel
  • mysql
  • zlib
  • zlib-devel
  • openssl
  • gcc

Quindi, provare quanto segue:

yum -y install mysql-devel mysql zlib zlib-devel openssl

Quindi provare ad installare di nuovo:

pip install mysql-python

( easy_install viene deprezzato in favore di pip , quindi abituati ad usarlo)

E vergognosamente: ecco un rapido scrittura su ambienti virtuali e un collegamento ad uno più approfondito . Date un'occhiata allo script di activate e vedrai che prepagherà il path alla directory ./bin / al tuo $PATH , in modo da poter gestire la stessa istanza python semplicemente pre-in attesa del path del binario.

Suggerimenti per Linux e Windows Server, quali Ubuntu, Centos, Apache, Nginx, Debian e argomenti di rete.