在Centos错误gcc上安装gevent

时间:2014-04-10 17:57:49

标签: python gcc centos

我已安装了所有要求(我认为),但在运行时仍然出现错误

pip install gevent

我也尝试从github安装,但下面出现同样的错误:

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/gev
ent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n
', '\n'), __file__, 'exec'))" install --record /tmp/pip-vKU7TO-record/install-record.txt
--single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_
root/gevent
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
  File "/usr/lib/python2.6/site-packages/pip-1.5.4-py2.6.egg/pip/__init__.py", line 185,
in main
    return command.main(cmd_args)
  File "/usr/lib/python2.6/site-packages/pip-1.5.4-py2.6.egg/pip/basecommand.py", line 16
1, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 30: ordinal not in r
ange(128)

我不确定其他哪些信息会有用,请告诉我。

2 个答案:

答案 0 :(得分:6)

如果你还需要答案,安装libevent-devel和python-devel可以解决这个问题。

yum install libevent-devel
yum install python devel

答案 1 :(得分:3)

使用yum为我解决了这个错误。

yum install python-gevent

由于某种原因,easy_install和pip不适用于gevent。