I'm having an issue where RPIO will not install. When running sudo pip install -U RPIO it returns the error :

source/c_gpio/py_gpio.c:28:20: fatal error: Python.h: No such file or directory
 #include "Python.h"
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

How do I fix this?

1 Answer 1


To get around this problem, I followed the advice from this answer.

Basically, "Python.h" is a part of Python Development tools. Whoever made RPIO is probably not aware that their code doesn't work on a system which doesn't have python-dev installed.

To fix the problem, install python-dev: sudo apt-get install python-dev

RPIO should install fine after this: sudo pip install -U RPIO

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.