我使用以下命令在Ubuntu 12.04上安装了一个名为RYU的openflow控制器:
sudo pip install ryu
我试图使用ryu-manager运行python文件,如下所示。
sudo ryu-manager simple_switch.py
Traceback (most recent call last):
File "/usr/local/bin/ryu-manager", line 19, in <module>
import gevent
ImportError: No module named gevent
然后,我尝试使用以下命令安装gevent:
sudo pip install gevent
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c gevent/core.c -o build/temp.linux-x86_64-2.7/gevent/core.o
gevent/core.c:4:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
此错误的原因是什么?我试图找到Python.h
使用sudo locate Python.h
,但没有成功。python -V
但是的输出是
Python 2.7.3
Python.h
系统上应该有吗?如果是这样,我应该安装什么来获得它?