riffnshred / nhl-led-scoreboard

🚨 Display NHL live score, stats, and more of your favorite teams, on a Raspberry Pi driven RGB LED matrix. 🚨
GNU General Public License v3.0
421 stars 96 forks source link

Fresh install not working #416

Open ELepolt opened 1 year ago

ELepolt commented 1 year ago

Describe the bug It seems that python3-pillow may not be getting properly installed. Every attempt at running sudo scripts/aptfile apt-requirements returns this exact screenshot (note the [NEW] next to pillow)

image

EDIT: This is fixed by changing python3-pillow to python3-pil Logs Running ./script/install.sh leads to this:

Running rgbmatrix installation...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: cython in /home/pi/.local/lib/python3.9/site-packages (3.0.0)
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/pi/.local/lib/python3.9/site-packages/cython.py", line 16, in <module>
    from Cython.Compiler.Main import main
  File "/home/pi/.local/lib/python3.9/site-packages/Cython/Compiler/Main.py", line 26, in <module>
    from . import Errors
  File "/home/pi/.local/lib/python3.9/site-packages/Cython/Compiler/Errors.py", line 22, in <module>
    from ..Utils import open_new_file
  File "Cython/Utils.py", line 36, in init Cython.Utils
ImportError: cannot import name __version__
make -C ./lib
make[1]: Entering directory '/home/pi/nhl-led-scoreboard/submodules/matrix/lib'
make[1]: Leaving directory '/home/pi/nhl-led-scoreboard/submodules/matrix/lib'
make -C examples-api-use
make[1]: Entering directory '/home/pi/nhl-led-scoreboard/submodules/matrix/examples-api-use'
make -C ../lib
make[2]: Entering directory '/home/pi/nhl-led-scoreboard/submodules/matrix/lib'
make[2]: Leaving directory '/home/pi/nhl-led-scoreboard/submodules/matrix/lib'
make[1]: Leaving directory '/home/pi/nhl-led-scoreboard/submodules/matrix/examples-api-use'
make -C bindings/python build
make[1]: Entering directory '/home/pi/nhl-led-scoreboard/submodules/matrix/bindings/python'
make -C ../../lib
make[2]: Entering directory '/home/pi/nhl-led-scoreboard/submodules/matrix/lib'
make[2]: Leaving directory '/home/pi/nhl-led-scoreboard/submodules/matrix/lib'
/usr/bin/python3 setup.py build --build-lib .
running build
running build_py
running build_ext
building 'core' extension
arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../include -I/usr/include/python3.9 -c rgbmatrix/core.cpp -o build/temp.linux-armv7l-3.9/rgbmatrix/core.o -O3 -Wall
rgbmatrix/core.cpp:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
    1 | #error Do not use this file, it is the result of a failed Cython compilation.
      |  ^~~~~
error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1

Your config file A screen shot of your config.json file can be really useful to help you.

Hardware you are using

Raspberry Pi 3 Model B Rev 1.2

Software

riffnshred commented 1 year ago

by which version of the software we mean the version of the NHL scoreboard you are running. what you posted is the version of raspberry pi OS.

We are aware that there is a new version of Pillow but it is not compatible with the current version and we force install the version that is compatible.

when you say fresh install, do you mean you pulled the latest version.

ELepolt commented 1 year ago

Sorry. Yes, fresh install meaning I just flashed a new SD card, and followed the step by step instructions utilizing the git pull

riffnshred commented 1 year ago

Try installing the Raspbien Lite version of raspberry pi, the latest version of raspberry pi is not fully supported yet.

falkyre commented 1 year ago

I think we need to update the rgbmatrix submodule to the latest version. I'm pretty sure we can get by without forcing the cython compilation with the newest version of the submodule. Also, the whole installation setup needs to be revisited to work properly with Bullseye (and the upcoming version Debian 12 Bookworm). Raspberry Pi still offers the Buster install as Raspberry Pi OS (legacy). That's what we support.

You can try commenting out these two lines in the install.sh

python3 -m pip install --no-cache-dir cython python3 -m cython -2 --cplus *.pyx

See if this fixes the rgbmatrix compilation.

falkyre commented 1 year ago

Try installing the Raspbien Lite version of raspberry pi, the latest version of raspberry pi is not fully supported yet.

Make sure it's the Raspbian Pi OS Lite (Legacy), that one is the Debian 10 (Buster) version

ELepolt commented 1 year ago

Sorry to keep bugging you... I just did this again using the buster version of Raspberry Pi OS (Legacy) and I'm still having the exact same issue as described above.

EDIT: I started over Raspberry Pi OS Lite (Bullseye), and commented out those two lines and it's running fine.

ncrowley commented 6 months ago

I also ran into this issue, looks like whatever was causing an issue in rgbmatrix that required a cython rebuild is fixed.

Commenting those lines out of the install.sh script fixes the issue as described.

falkyre commented 6 months ago

Next release removes those lines in the install script.