DietPi
DietPi copied to clipboard
Can't install rpi_ws281x on Dietpi
Hi.
Help please. I can't install rpi_ws281x on Dietpi. I have the latest version of Dietpi which is 8.5 on a Raspberry Pi 3b+
Error code is below.
Thank you for you help in advance. Kind Regards Craig.
dietpi@RR-DietPi-RPi:~$ sudo pip3 install rpi_ws281x
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting rpi_ws281x
Using cached rpi_ws281x-4.3.4.tar.gz (64 kB)
Building wheels for collected packages: rpi-ws281x
Building wheel for rpi-ws281x (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-z_7r1gkh/rpi-ws281x_ 18c87da3684848aa851ba36db5dcdfed/setup.py'"'"'; file='"'"'/tmp/pip-install-z_7r1gkh/rpi-ws281x_18c87da3684848aa851ba36db5d cdfed/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f. close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-587l2f9a
cwd: /tmp/pip-install-z_7r1gkh/rpi-ws281x_18c87da3684848aa851ba36db5dcdfed/
Complete output (20 lines):
running bdist_wheel
running build
running build_py
Compiling ws281x library...
creating build
creating build/lib.linux-aarch64-3.9
creating build/lib.linux-aarch64-3.9/rpi_ws281x
copying rpi_ws281x/rpi_ws281x.py -> build/lib.linux-aarch64-3.9/rpi_ws281x
copying rpi_ws281x/init.py -> build/lib.linux-aarch64-3.9/rpi_ws281x
running build_ext
building '_rpi_ws281x' extension
creating build/temp.linux-aarch64-3.9
creating build/temp.linux-aarch64-3.9/lib
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/p ython3.9-PN012d/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-ma p=/build/python3.9-PN012d/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_S OURCE=2 -fPIC -I. -I/usr/include/python3.9 -c lib/dma.c -o build/temp.linux-aarch64-3.9/lib/dma.o
In file included from lib/dma.c:31:
/usr/lib/gcc/aarch64-linux-gnu/10/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
9 | # include_next <stdint.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
ERROR: Failed building wheel for rpi-ws281x
Running setup.py clean for rpi-ws281x
Failed to build rpi-ws281x
Installing collected packages: rpi-ws281x
Running setup.py install for rpi-ws281x ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-z_7r1gkh/rpi-ws281 x_18c87da3684848aa851ba36db5dcdfed/setup.py'"'"'; file='"'"'/tmp/pip-install-z_7r1gkh/rpi-ws281x_18c87da3684848aa851ba36db 5dcdfed/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"'); f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-t2boq9ak/install-record.txt --single -version-externally-managed --compile --install-headers /usr/local/include/python3.9/rpi-ws281x
cwd: /tmp/pip-install-z_7r1gkh/rpi-ws281x_18c87da3684848aa851ba36db5dcdfed/
Complete output (20 lines):
running install
running build
running build_py
Compiling ws281x library...
creating build
creating build/lib.linux-aarch64-3.9
creating build/lib.linux-aarch64-3.9/rpi_ws281x
copying rpi_ws281x/rpi_ws281x.py -> build/lib.linux-aarch64-3.9/rpi_ws281x
copying rpi_ws281x/init.py -> build/lib.linux-aarch64-3.9/rpi_ws281x
running build_ext
building '_rpi_ws281x' extension
creating build/temp.linux-aarch64-3.9
creating build/temp.linux-aarch64-3.9/lib
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build /python3.9-PN012d/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix- map=/build/python3.9-PN012d/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY _SOURCE=2 -fPIC -I. -I/usr/include/python3.9 -c lib/dma.c -o build/temp.linux-aarch64-3.9/lib/dma.o
In file included from lib/dma.c:31:
/usr/lib/gcc/aarch64-linux-gnu/10/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
9 | # include_next <stdint.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/t mp/pip-install-z_7r1gkh/rpi-ws281x_18c87da3684848aa851ba36db5dcdfed/setup.py'"'"'; file='"'"'/tmp/pip-install-z_7r1gkh/rpi -ws281x_18c87da3684848aa851ba36db5dcdfed/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().repla ce('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-t2b oq9ak/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/rpi-ws28 1x Check the logs for full command output.
dietpi@RR-DietPi-RPi:~$
You need to install missing files/packages
fatal error: stdint.h: No such file or directory
Following could do it
dietpi-software install 16
Not sure how this file can be missing when the gcc compile is not. It's from libgcc-10-dev which is a dependency of gcc itself. Try to install the compiler only, skipping the whole build essential stack for now:
apt install gcc
I'll mark this as closed. Feel free to reopen if required.