Skywriter Hat not working on Pi3


#1

New Skywriter Hat Attaced to Pi 3, Have run:-
$ curl -sSL get.pimoroni.com/skywriter | bash

$ sudo apt-get install libx11-dev libxtst-dev
both worked ok

$ sudo pip install autopy produced following errors:-

pi@raspberrypi:~/Pimoroni/skywriter $ sudo pip install autopy
Downloading/unpacking autopy
Downloading autopy-0.51.tar.gz (74kB): 74kB downloaded
Running setup.py (path:/tmp/pip-build-trrB5z/autopy/setup.py) egg_info for package autopy

Installing collected packages: autopy
Running setup.py install for autopy
building ‘color’ extension
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 -DNDEBUG=1 -DMM_LITTLE_ENDIAN -DUSE_X11 -I/usr/include/python2.7 -c src/autopy-color-module.c -o build/temp.linux-armv7l-2.7/src/autopy-color-module.o -Wall -Wparentheses -Winline -Wbad-function-cast -Wdisabled-optimization -Wshadow
In file included from src/autopy-color-module.c:1:0:
src/autopy-color-module.h:5: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-trrB5z/autopy/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-a7wiJ2-record/install-record.txt --single-version-externally-managed --compile:
running install

running build

running build_py

creating build

creating build/lib.linux-armv7l-2.7

creating build/lib.linux-armv7l-2.7/autopy

copying autopy/init.py -> build/lib.linux-armv7l-2.7/autopy

running build_ext

building ‘color’ extension

creating build/temp.linux-armv7l-2.7

creating build/temp.linux-armv7l-2.7/src

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 -DNDEBUG=1 -DMM_LITTLE_ENDIAN -DUSE_X11 -I/usr/include/python2.7 -c src/autopy-color-module.c -o build/temp.linux-armv7l-2.7/src/autopy-color-module.o -Wall -Wparentheses -Winline -Wbad-function-cast -Wdisabled-optimization -Wshadow

In file included from src/autopy-color-module.c:1:0:

src/autopy-color-module.h:5: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


Cleaning up…
Command /usr/bin/python -c “import setuptools, tokenize;file=’/tmp/pip-build-trrB5z/autopy/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-a7wiJ2-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-trrB5z/autopy
Storing debug log for failure in /root/.pip/pip.log
pi@raspberrypi:~/Pimoroni/skywriter $


#2

Looks like you’ve got most of the way. The debug output tells you exactly what the problem is here:

Any sort of <xyz>.h missing error is invariably down to a missing dependency, and they usually follow a fairly standard pattern of <xyz>-dev - which you can fish around for with apt-cache search. Google is good at turning up the specific package you want if that fails.

In a staunch and stubborn effort to teach you to fish, I’m going to see if you can figure out which magic incantation you need to perform to continue ;)