Python 在Centos上安装gevent时出错
我已经安装了所有的需求(我想),但在运行时仍然会出错Python 在Centos上安装gevent时出错,python,gcc,centos,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_bui
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)
错误:命令“gcc”失败,退出状态为1
----------------------------------------
清理。。。
Command/usr/bin/python-c“导入setuptools,tokenize;_文件__=”/tmp/pip_build_root/gev
ent/setup.py';exec(compile(getattr(tokenize,'open',open)(_文件_).read()。replace('\r\n
“,”\n“,”文件“,”执行“)”安装--record/tmp/pip-vKU7TO-record/install-record.txt
--外部管理的单一版本--编译失败,在/tmp/pip_build中出现错误代码1_
根/根通风
回溯(最近一次呼叫最后一次):
文件“/usr/bin/pip”,第9行,在
加载入口点('pip==1.5.4','console脚本','pip')()
文件“/usr/lib/python2.6/site packages/pip-1.5.4-py2.6.egg/pip/_init__.py”,第185行,
大体上
return command.main(cmd_args)
文件“/usr/lib/python2.6/site packages/pip-1.5.4-py2.6.egg/pip/basecommand.py”,第16行
1.大体上
text='\n'.连接(完成日志)
UnicodeDecodeError:“ascii”编解码器无法解码位置30中的字节0xe2:序号不在r中
安格(128)
我不确定还有哪些信息有用,请告诉我。如果您仍然需要答案,安装libevent-devel和python-devel可以解决这个问题
yum install libevent-devel
yum install python-devel
使用yum为我解决了这个错误
yum install python-gevent
由于某些原因,easy_install和pip在gevent上不起作用。我想你的意思是
yum安装python-devel