Python.h 在 Ubuntu 12.04 中丢失
- 论坛
- Python.h 在 Ubuntu 12.04 中丢失
12 浏览
Python.h 在 Ubuntu 12.04 中丢失
我在我的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, inimport 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
这个错误的原因是什么?我尝试使用sudo locate Python.h
定位Python.h
,但没有成功。然而,python -V
的输出是
Python 2.7.3
系统中是否应该存在Python.h
?如果是,我应该安装什么来获取它?