繁体   English   中英

在Centos 6.4上安装mysql-python

[英]installing mysql-python on Centos 6.4

(env)[root @ RISERVER Audiotube]#pip安装mysql-python

从上面的命令我正在以下错误...

_mysql.c:2760: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_Type’

_mysql.c:2848: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_Type’

_mysql.c:2938: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_methods’

_mysql.c:3010: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token

_mysql.c:3058: warning: return type defaults to ‘int’

_mysql.c: In function ‘DL_EXPORT’:

_mysql.c:3058: error: expected declaration specifiers before ‘init_mysql’

_mysql.c:3166: error: expected ‘{’ at end of input

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /mnt/external/project/audiotube/project/env/bin/python -c "import setuptools, tokenize;__file__='/mnt/external/project/audiotube/project/env/build/mysql-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-MO14TZ-record/install-record.txt --single-version-externally-managed --compile --install-headers /mnt/external/project/audiotube/project/env/include/site/python2.6 failed with error code 1 in /mnt/external/project/audiotube/project/env/build/mysql-python
Traceback (most recent call last):
  File "/mnt/external/project/audiotube/project/env/bin/pip", line 11, in <module>
    sys.exit(main())
  File "/mnt/external/project/audiotube/project/env/lib/python2.6/site-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/mnt/external/project/audiotube/project/env/lib/python2.6/site-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 33: ordinal not in range(128)

注意: centos,virtualenv

我的猜测是您必须安装软件包“ python-devel”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM