I installed an openflow controller on my Ubuntu 12.04 called RYU using:
JavaScript
x
2
1
sudo pip install ryu
2
I was trying to run a python file using ryu-manager as shown below.
JavaScript
1
6
1
sudo ryu-manager simple_switch.py
2
Traceback (most recent call last):
3
File "/usr/local/bin/ryu-manager", line 19, in <module>
4
import gevent
5
ImportError: No module named gevent
6
Then I tried to install gevent using:
JavaScript
1
8
1
sudo pip install gevent
2
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
3
gevent/core.c:4:20: fatal error: Python.h: No such file or directory
4
5
compilation terminated.
6
7
error: command 'gcc' failed with exit status 1
8
What is the cause of this error? I tried to locate Python.h
using sudo locate Python.h
, but without success. The output of python -V
however is
JavaScript
1
2
1
Python 2.7.3
2
Should Python.h
be there on the system? If so, what should I install to get it?
Advertisement
Answer
This should do it:
sudo apt-get update; sudo apt-get install python-dev -y
It will install any missing headers. It helped me a lot.