I realise that this is a somewhat older post and you have said that a fix went out for this; but I am seeing the same error today trying to install the Blinkt! libraries.
Any help gratefully received!
The detail from the pip log file shows this:
Found existing installation: RPi.GPIO 0.6.2
Not uninstalling RPi.GPIO at /usr/lib/python2.7/dist-packages, owned by OS
Running setup.py install for RPi.GPIO
Running command /usr/bin/python -c “import setuptools, tokenize;file=’/tmp/pip-build-KqESVx/RPi.GPIO/setup.py’;exec(compile(getattr(
tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-T9yzNF-record/install-record.t
xt --single-version-externally-managed --compile
running install
running build
running build_py
creating build
creating build/lib.linux-armv6l-2.7
creating build/lib.linux-armv6l-2.7/RPi
copying RPi/init.py -> build/lib.linux-armv6l-2.7/RPi
creating build/lib.linux-armv6l-2.7/RPi/GPIO
copying RPi/GPIO/init.py -> build/lib.linux-armv6l-2.7/RPi/GPIO
running build_ext
building ‘RPi._GPIO’ extension
creating build/temp.linux-armv6l-2.7
creating build/temp.linux-armv6l-2.7/source
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-p
rotector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c source/py_gpio.c -o build/temp.linux-armv6l-2.7/source/py
_gpio.o
source/py_gpio.c:23: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
Complete output from command /usr/bin/python -c “import setuptools, tokenize;file=’/tmp/pip-build-KqESVx/RPi.GPIO/setup.py’;exec(com
pile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-T9yzNF-record/ins
tall-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-armv6l-2.7
creating build/lib.linux-armv6l-2.7/RPi
copying RPi/init.py -> build/lib.linux-armv6l-2.7/RPi
creating build/lib.linux-armv6l-2.7/RPi/GPIO
copying RPi/GPIO/init.py -> build/lib.linux-armv6l-2.7/RPi/GPIO
running build_ext
building ‘RPi._GPIO’ extension
creating build/temp.linux-armv6l-2.7
creating build/temp.linux-armv6l-2.7/source
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c source/py_gpio.c -o build/temp.linux-armv6l-2.7/source/py_gpio.o
source/py_gpio.c:23: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
Can’t roll back RPi.GPIO; was not uninstalled