TobKra96 / music_led_strip_control

Audio visualization for LED strips in real-time with web interface on a raspberry pi.
https://tobkra96.github.io/music_led_strip_control/
MIT License
300 stars 64 forks source link

Can't install on 64bit RaspiOS Lite #174

Closed Xitee1 closed 2 years ago

Xitee1 commented 2 years ago

MLSC does not install on 64bit RaspiOS Lite. 32bit works without errors.

Both, 32bit and 64bit were completely fresh installed and I have only executed 'sudo su', 'apt update' and 'apt full-upgrade -y' before the installation.

root@MLSC:~# curl -sSL https://raw.githubusercontent.com/TobKra96/music_led_strip_control/master/setup.sh | sudo bash -s -- -b master

                  *********************
                  *  Installing MLSC  *
                  *********************

[1/4] Updating and installing required packages...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libatlas-base-dev is already the newest version (3.10.3-10).
git is already the newest version (1:2.30.2-1).
portaudio19-dev is already the newest version (19.6.0-1.1).
python3 is already the newest version (3.9.2-3).
python3-pip is already the newest version (20.3.4-4+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pip in /usr/local/lib/python3.9/dist-packages (22.1.2)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Packages updated and installed.

[2/4] Installing MLSC...
MLSC is already installed. Do you want to reinstall it? [y/N] y
Proceeding...

New backup of MLSC created.
Cloning into 'music_led_strip_control'...
remote: Enumerating objects: 259, done.
remote: Counting objects: 100% (259/259), done.
remote: Compressing objects: 100% (222/222), done.
remote: Total 259 (delta 55), reused 137 (delta 16), pack-reused 0
Receiving objects: 100% (259/259), 2.55 MiB | 235.00 KiB/s, done.
Resolving deltas: 100% (55/55), done.

Config is stored in .mlsc, in the same directory as the MLSC installation.
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting PyAudio==0.2.11
  Downloading PyAudio-0.2.11.tar.gz (37 kB)
  Preparing metadata (setup.py) ... done
Collecting numpy==1.21.0
  Downloading numpy-1.21.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.0/13.0 MB 307.0 kB/s eta 0:00:00
Collecting coloredlogs==15.0
  Downloading https://www.piwheels.org/simple/coloredlogs/coloredlogs-15.0-py2.py3-none-any.whl (45 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.8/45.8 kB 242.8 kB/s eta 0:00:00
Collecting scipy==1.6.2
  Downloading scipy-1.6.2-cp39-cp39-manylinux2014_aarch64.whl (26.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 26.1/26.1 MB 507.6 kB/s eta 0:00:00
Collecting Werkzeug==2.0.3
  Downloading https://www.piwheels.org/simple/werkzeug/Werkzeug-2.0.3-py3-none-any.whl (289 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 289.2/289.2 kB 538.2 kB/s eta 0:00:00
Collecting Flask==2.0.3
  Downloading https://www.piwheels.org/simple/flask/Flask-2.0.3-py3-none-any.whl (95 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.6/95.6 kB 638.8 kB/s eta 0:00:00
Collecting Flask_Login==0.5.0
  Downloading https://www.piwheels.org/simple/flask-login/Flask_Login-0.5.0-py2.py3-none-any.whl (16 kB)
Collecting Jinja2==3.0.1
  Downloading https://www.piwheels.org/simple/jinja2/Jinja2-3.0.1-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.7/133.7 kB 32.7 MB/s eta 0:00:00
Collecting waitress==2.1.2
  Downloading https://www.piwheels.org/simple/waitress/waitress-2.1.2-py3-none-any.whl (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.7/57.7 kB 596.9 kB/s eta 0:00:00
Collecting rpi_ws281x==4.3.4
  Downloading rpi_ws281x-4.3.4.tar.gz (64 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.2/64.2 kB 373.6 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting icmplib==3.0
  Downloading https://www.piwheels.org/simple/icmplib/icmplib-3.0-py3-none-any.whl (30 kB)
Collecting flasgger==0.9.5
  Downloading https://www.piwheels.org/simple/flasgger/flasgger-0.9.5-py2.py3-none-any.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 213.4 kB/s eta 0:00:00
Collecting psutil
  Downloading psutil-5.9.1.tar.gz (479 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 479.1/479.1 kB 386.2 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting humanfriendly>=9.1
  Downloading https://www.piwheels.org/simple/humanfriendly/humanfriendly-10.0-py2.py3-none-any.whl (89 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.9/89.9 kB 413.7 kB/s eta 0:00:00
Collecting click>=7.1.2
  Downloading https://www.piwheels.org/simple/click/click-8.1.3-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 629.4 kB/s eta 0:00:00
Collecting itsdangerous>=2.0
  Downloading https://www.piwheels.org/simple/itsdangerous/itsdangerous-2.1.2-py3-none-any.whl (15 kB)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (26 kB)
Collecting PyYAML>=3.0
  Downloading PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (731 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 731.1/731.1 kB 325.2 kB/s eta 0:00:00
Collecting jsonschema>=3.0.1
  Downloading https://www.piwheels.org/simple/jsonschema/jsonschema-4.6.1-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.8/80.8 kB 88.9 kB/s eta 0:00:00
Collecting mistune
  Downloading mistune-2.0.3-py2.py3-none-any.whl (24 kB)
Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from flasgger==0.9.5->-r music_led_strip_control/requirements.txt (line 12)) (1.16.0)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
  Downloading pyrsistent-0.18.1.tar.gz (100 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.5/100.5 kB 109.8 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting attrs>=17.4.0
  Downloading https://www.piwheels.org/simple/attrs/attrs-21.4.0-py2.py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.5/60.5 kB 79.3 kB/s eta 0:00:00
Building wheels for collected packages: PyAudio, rpi_ws281x, psutil, pyrsistent
  Building wheel for PyAudio (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-3.9
      copying src/pyaudio.py -> build/lib.linux-aarch64-3.9
      running build_ext
      building '_portaudio' extension
      creating build/temp.linux-aarch64-3.9
      creating build/temp.linux-aarch64-3.9/src
      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/usr/include/python3.9 -c src/_portaudiomodule.c -o build/temp.linux-aarch64-3.9/src/_portaudiomodule.o
      src/_portaudiomodule.c:28:10: fatal error: Python.h: No such file or directory
         28 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyAudio
  Running setup.py clean for PyAudio
  Building wheel for rpi_ws281x (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      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/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
      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/mailbox.c -o build/temp.linux-aarch64-3.9/lib/mailbox.o
      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/main.c -o build/temp.linux-aarch64-3.9/lib/main.o
      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/pcm.c -o build/temp.linux-aarch64-3.9/lib/pcm.o
      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/pwm.c -o build/temp.linux-aarch64-3.9/lib/pwm.o
      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/rpihw.c -o build/temp.linux-aarch64-3.9/lib/rpihw.o
      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/ws2811.c -o build/temp.linux-aarch64-3.9/lib/ws2811.o
      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 rpi_ws281x_wrap.c -o build/temp.linux-aarch64-3.9/rpi_ws281x_wrap.o
      rpi_ws281x_wrap.c:130:11: fatal error: Python.h: No such file or directory
        130 | # include <Python.h>
            |           ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for rpi_ws281x
  Running setup.py clean for rpi_ws281x
  Building wheel for psutil (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for psutil (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [46 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-39
      creating build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_common.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_psposix.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_psbsd.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_psosx.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_compat.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_psaix.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_pslinux.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_pswindows.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/__init__.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_pssunos.py -> build/lib.linux-aarch64-cpython-39/psutil
      creating build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_bsd.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/foo.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/runner.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_sunos.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_connections.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_memleaks.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_contracts.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_system.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_windows.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/__main__.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_testutils.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_unicode.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/__init__.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_aix.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_posix.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_process.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_linux.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_osx.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_misc.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      running build_ext
      building 'psutil._psutil_linux' extension
      creating build/temp.linux-aarch64-cpython-39
      creating build/temp.linux-aarch64-cpython-39/psutil
      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 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=591 -DPSUTIL_LINUX=1 -I/usr/include/python3.9 -c psutil/_psutil_common.c -o build/temp.linux-aarch64-cpython-39/psutil/_psutil_common.o
      psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
          9 | #include <Python.h>
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/aarch64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for psutil
  Building wheel for pyrsistent (pyproject.toml) ... done
  Created wheel for pyrsistent: filename=pyrsistent-0.18.1-cp39-cp39-linux_aarch64.whl size=56386 sha256=a4882fcfc203bf84f97472f8f90ce79ad1179307cd28f13cbbb4ee4cfd27f81c
  Stored in directory: /tmp/pip-ephem-wheel-cache-jxml272k/wheels/87/fe/e6/fc8deeb581a41e462eafaf19fee96f51cdc8391e0be1c8088a
Successfully built pyrsistent
Failed to build PyAudio rpi_ws281x psutil
ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects

[3/4] Configuring microphone settings...

Backup of existing /etc/asound.conf created.

New configuration for /etc/asound.conf saved.

Backup of existing /usr/share/alsa/alsa.conf created.

New configuration for /usr/share/alsa/alsa.conf saved.

[4/4] Creating autostart service for MLSC...

Autostart script for MLSC already exists in '/etc/systemd/system/mlsc.service'.

                  ********************************************
                  *       MLSC installation completed!       *
                  * Please reboot your system (sudo reboot). *
                  ********************************************
root@MLSC:~#
Teraskull commented 2 years ago

Hi @Xitee1,

Yes, it's a known issue, since we did not test or support Raspberry Pi OS 64bit yet.

Can you try running:

sudo apt-get install libglib2.0-dev python3-pyaudio python3-psutil

And then run the MLSC setup again?

This should install the dependencies required to build wheels for PyAudio, rpi_ws281x, and psutil.

If this will solve your issue, I will add this installation step to the setup.

Thanks!

Xitee1 commented 2 years ago

That sadly did not work. I still get the same error message.

Teraskull commented 2 years ago

@Xitee1,

I'm flashing a 64bit image on my 3B+ right now, will see what can be done.

Teraskull commented 2 years ago

@Xitee1,

Everything installed correctly for me after running:

sudo apt install python3-dev

I updated the setup script to include it.

Teraskull commented 2 years ago

Closing as fixed.