We are completely new to our raspberry Pi and are have a problem getting the Unicorn Hat software to install properly. Below is a copy of the error messages:
pi@raspberrypi:/ $ curl -sS get.pimoroni.com/unicornhat | bash
This script will install everything needed to use your
Unicorn HAT/pHAT
Always be careful when running scripts and commands
copied from the internet. Ensure they are from a
trusted source.
If you want to see what this script does before
running it, you should run:
\curl -sS https://get.pimoroni.com/unicornhat
Do you wish to continue? [y/N] y
Checking environmentā¦
Updating apt indexesā¦
ā¦
Reading package listsā¦
ā¦
Checking hardware requirementsā¦
Checking for packages required for GPIO controlā¦
Requirement already satisfied (use --upgrade to upgrade): RPi.GPIO in /usr/lib/python2.7/dist-packages
Cleaning upā¦
Requirement already satisfied (use --upgrade to upgrade): RPi.GPIO in /usr/lib/python3/dist-packages
Cleaning upā¦
RPi.GPIO installed and up-to-date
Unicorn HAT/pHAT comes with examples and documentation that you may wish to install.
Performing a full install will ensure those resources are installed,
along with all required dependencies. It may however take a while!
Do you wish to perform a full install? [y/N] y
Checking install requirementsā¦
Checking for dependenciesā¦
python-dev is required
Installing python-devā¦
E: Unmet dependencies. Try āapt-get -f installā with no packages (or specify a solution).
Apt failed to install python-dev!
Falling back on pypiā¦
python3-dev is already installed
Installing Unicorn HAT/pHAT library for Python 2ā¦
Requirement already satisfied (use --upgrade to upgrade): unicornhat in /usr/local/lib/python2.7/dist-packages
Downloading/unpacking rpi-ws281x>=2.0.0 (from unicornhat)
Downloading rpi_ws281x-2.0.3.tar.gz (92kB): 92kB downloaded
Running setup.py (path:/tmp/pip-build-mYmmx9/rpi-ws281x/setup.py) egg_info for package rpi-ws281x
Installing collected packages: rpi-ws281x
Running setup.py install for rpi-ws281x
Compiling ws281x libraryā¦
building ā_rpi_ws281xā 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 -Ilib/ -I/usr/include/python2.7 -c rpi_ws281x_wrap.c -o build/temp.linux-armv7l-2.7/rpi_ws281x_wrap.o
rpi_ws281x_wrap.c:130:21: 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-mYmmx9/rpi-ws281x/setup.pyā;exec(compile(getattr(tokenize, āopenā, open)(file).read().replace(ā\r\nā, ā\nā), file, āexecā))ā install --record /tmp/pip-ObbfI8-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
Compiling ws281x libraryā¦
creating build
creating build/lib.linux-armv7l-2.7
copying neopixel.py -> build/lib.linux-armv7l-2.7
running build_ext
building ā_rpi_ws281xā extension
creating build/temp.linux-armv7l-2.7
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 -Ilib/ -I/usr/include/python2.7 -c rpi_ws281x_wrap.c -o build/temp.linux-armv7l-2.7/rpi_ws281x_wrap.o
rpi_ws281x_wrap.c:130:21: 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-mYmmx9/rpi-ws281x/setup.pyā;exec(compile(getattr(tokenize, āopenā, open)(file).read().replace(ā\r\nā, ā\nā), file, āexecā))ā install --record /tmp/pip-ObbfI8-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-mYmmx9/rpi-ws281x
Storing debug log for failure in /root/.pip/pip.log
Python 2 library install failed!
If problems persist, visit forums.pimoroni.com for support