Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation script doesn't work on DietPi OS #141

Open
ydogandjiev opened this issue Dec 3, 2020 · 2 comments
Open

Installation script doesn't work on DietPi OS #141

ydogandjiev opened this issue Dec 3, 2020 · 2 comments

Comments

@ydogandjiev
Copy link

ydogandjiev commented Dec 3, 2020

Hi, I'm hitting an error with your installation script:

Installing Unicorn HAT/pHAT library for Python 2...

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting unicornhat
Using cached https://files.pythonhosted.org/packages/84/81/bd52bd6119e5b807adf975b33c310c167013afd27bcc1c98cd21e91b45e2/unicornhat-2.2.3.tar.gz
Collecting rpi_ws281x>=3.0.3 (from unicornhat)
Downloading https://files.pythonhosted.org/packages/4b/ac/1bbae8f7c916150f4260214392d68c8c166e414d8ea6f103a299a0e04179/rpi_ws281x-4.2.5.tar.gz (62kB)
100% |████████████████████████████████| 71kB 445kB/s
Building wheels for collected packages: unicornhat, rpi-ws281x
Running setup.py bdist_wheel for unicornhat ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-uFkBwH/unicornhat/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-G3FjAy --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help

error: invalid command 'bdist_wheel'


Failed building wheel for unicornhat
Running setup.py clean for unicornhat
Running setup.py bdist_wheel for rpi-ws281x ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-uFkBwH/rpi-ws281x/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-7RDAaZ --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help

error: invalid command 'bdist_wheel'


Failed building wheel for rpi-ws281x
Running setup.py clean for rpi-ws281x
Failed to build unicornhat rpi-ws281x
Installing collected packages: rpi-ws281x, unicornhat
Running setup.py install for rpi-ws281x ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-uFkBwH/rpi-ws281x/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-tujBWS/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
Compiling ws281x library...
creating build
creating build/lib.linux-armv6l-2.7
creating build/lib.linux-armv6l-2.7/rpi_ws281x
copying rpi_ws281x/rpi_ws281x.py -> build/lib.linux-armv6l-2.7/rpi_ws281x
copying rpi_ws281x/init.py -> build/lib.linux-armv6l-2.7/rpi_ws281x
running build_ext
building '_rpi_ws281x' extension
creating build/temp.linux-armv6l-2.7
creating build/temp.linux-armv6l-2.7/lib
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-InigCj/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -I/usr/include/python2.7 -c rpi_ws281x_wrap.c -o build/temp.linux-armv6l-2.7/rpi_ws281x_wrap.o
unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-uFkBwH/rpi-ws281x/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-tujBWS/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-uFkBwH/rpi-ws281x/
Python 2 library install failed!
If problems persist, visit forums.pimoroni.com for support

@ydogandjiev
Copy link
Author

ydogandjiev commented Dec 3, 2020

First I had to install python-setuptools:
sudo apt-get install -y python-setuptools

Now I need to install wheel:
pip install wheel

It would be good if the installation script installed all of these missing dependencies instead of failing.

@ydogandjiev
Copy link
Author

ydogandjiev commented Dec 4, 2020

Looks like one more dependency is missing. I am now installing it:
sudo apt-get install gcc-arm-linux-gnueabihf

@ydogandjiev ydogandjiev changed the title Installation script doesn't work Installation script doesn't work on DietPi OS Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant