OpenVoiceOS / ovos-docker

Open Voice OS container images and docker-compose.yml files for x86_64 and aarch64 CPU architectures.
https://openvoiceos.github.io/ovos-docker/
Apache License 2.0
39 stars 11 forks source link

ovos-PHAL-plugin-respeaker-2mic Issue when installing with phal.list #47

Closed s--p closed 9 months ago

s--p commented 9 months ago

My first opened Issue, so I will be grateful for any comments and advice how to make it better in the future!

System: Raspberry Pi4 / "Debian GNU/Linux 12 (bookworm)"

I used https://github.com/OpenVoiceOS/ovos-installer to install the docker version.

I have the ReSpeaker 2Mic-HAT installed with these drivers https://github.com/seeed-studio-projects/seeed-voicecard

When I'm trying to install the ovos-PHAL-plugin-respeaker-2mic using the phal.list I get this error message:

ERROR: Could not find a version that satisfies the requirement ovos-PHAL-plugin-respeaker-2mic (from versions: none)
ERROR: No matching distribution found for ovos-PHAL-plugin-respeaker-2mic
2023-11-25 21:35:19.005 - PHAL - ovos_PHAL.service:on_started:25 - INFO - PHAL is started
2023-11-25 21:35:19.108 - PHAL - ovos_bus_client.session:from_message:447 - WARNING - No session context in message:connected
2023-11-25 21:35:19.237 - PHAL - ovos_PHAL.service:load_plugins:83 - INFO - PHAL plugin loaded: ovos-phal-plugin-ipgeo
2023-11-25 21:35:19.405 - PHAL - ovos_PHAL.service:load_plugins:83 - INFO - PHAL plugin loaded: ovos-PHAL-plugin-alsa
2023-11-25 21:35:19.414 - PHAL - ovos_PHAL.service:load_plugins:83 - INFO - PHAL plugin loaded: ovos-PHAL-plugin-system
2023-11-25 21:35:19.416 - PHAL - ovos_PHAL.service:on_ready:9 - INFO - PHAL is ready.

When changing it to git+https://github.com/OpenVoiceOS/ovos-PHAL-plugin-respeaker-2mic.git it gives me this error message:

Collecting git+https://github.com/OpenVoiceOS/ovos-PHAL-plugin-respeaker-2mic.git (from -r /home/ovos/.config/mycroft/phal.list (line 1))
  Cloning https://github.com/OpenVoiceOS/ovos-PHAL-plugin-respeaker-2mic.git to /tmp/pip-req-build-c9cfrlm1
  Running command git clone --filter=blob:none --quiet https://github.com/OpenVoiceOS/ovos-PHAL-plugin-respeaker-2mic.git /tmp/pip-req-build-c9cfrlm1
  Resolved https://github.com/OpenVoiceOS/ovos-PHAL-plugin-respeaker-2mic.git to commit 9714e3e3611064f07ac871bcc4a983d255753f21
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting RPi.GPIO
  Downloading RPi.GPIO-0.7.1.tar.gz (29 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: ovos-plugin-manager>=0.0.1 in ./.venv/lib/python3.11/site-packages (from ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (0.0.24)
Collecting spidev
  Downloading spidev-3.6.tar.gz (11 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: combo-lock~=0.2 in ./.venv/lib/python3.11/site-packages (from ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (0.2.6)
Requirement already satisfied: importlib-metadata in ./.venv/lib/python3.11/site-packages (from ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (6.8.0)
Requirement already satisfied: langcodes~=3.3.0 in ./.venv/lib/python3.11/site-packages (from ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (3.3.0)
Requirement already satisfied: ovos-bus-client<0.1.0,>=0.0.3 in ./.venv/lib/python3.11/site-packages (from ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (0.0.6a19)
Requirement already satisfied: ovos-config<0.1.0,>=0.0.8 in ./.venv/lib/python3.11/site-packages (from ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (0.0.12a1)
Requirement already satisfied: ovos-utils<0.1.0,>=0.0.32 in ./.venv/lib/python3.11/site-packages (from ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (0.0.37a1)
Requirement already satisfied: quebra-frases in ./.venv/lib/python3.11/site-packages (from ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (0.3.7)
Requirement already satisfied: requests~=2.26 in ./.venv/lib/python3.11/site-packages (from ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (2.31.0)
Requirement already satisfied: filelock~=3.0 in ./.venv/lib/python3.11/site-packages (from combo-lock~=0.2->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (3.13.1)
Requirement already satisfied: memory-tempfile in ./.venv/lib/python3.11/site-packages (from combo-lock~=0.2->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (2.2.3)
Requirement already satisfied: pyee<9.0.0,>=8.1.0 in ./.venv/lib/python3.11/site-packages (from ovos-bus-client<0.1.0,>=0.0.3->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (8.2.2)
Requirement already satisfied: websocket-client>=0.54.0 in ./.venv/lib/python3.11/site-packages (from ovos-bus-client<0.1.0,>=0.0.3->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (1.6.4)
Requirement already satisfied: PyYAML<7.0.0,>=5.4.0 in ./.venv/lib/python3.11/site-packages (from ovos-config<0.1.0,>=0.0.8->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (6.0.1)
Requirement already satisfied: python-dateutil~=2.6 in ./.venv/lib/python3.11/site-packages (from ovos-config<0.1.0,>=0.0.8->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (2.8.2)
Requirement already satisfied: rich-click~=1.6 in ./.venv/lib/python3.11/site-packages (from ovos-config<0.1.0,>=0.0.8->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (1.7.1)
Requirement already satisfied: json-database~=0.7 in ./.venv/lib/python3.11/site-packages (from ovos-utils<0.1.0,>=0.0.32->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (0.7.0)
Requirement already satisfied: kthread~=0.2 in ./.venv/lib/python3.11/site-packages (from ovos-utils<0.1.0,>=0.0.32->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (0.2.3)
Requirement already satisfied: pexpect~=4.6 in ./.venv/lib/python3.11/site-packages (from ovos-utils<0.1.0,>=0.0.32->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (4.8.0)
Requirement already satisfied: watchdog in ./.venv/lib/python3.11/site-packages (from ovos-utils<0.1.0,>=0.0.32->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (3.0.0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./.venv/lib/python3.11/site-packages (from requests~=2.26->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in ./.venv/lib/python3.11/site-packages (from requests~=2.26->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./.venv/lib/python3.11/site-packages (from requests~=2.26->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (2.1.0)
Requirement already satisfied: certifi>=2017.4.17 in ./.venv/lib/python3.11/site-packages (from requests~=2.26->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (2023.11.17)
Requirement already satisfied: zipp>=0.5 in ./.venv/lib/python3.11/site-packages (from importlib-metadata->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (3.17.0)
Requirement already satisfied: regex in ./.venv/lib/python3.11/site-packages (from quebra-frases->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (2023.10.3)
Requirement already satisfied: ptyprocess>=0.5 in ./.venv/lib/python3.11/site-packages (from pexpect~=4.6->ovos-utils<0.1.0,>=0.0.32->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (0.7.0)
Requirement already satisfied: six>=1.5 in ./.venv/lib/python3.11/site-packages (from python-dateutil~=2.6->ovos-config<0.1.0,>=0.0.8->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (1.16.0)
Requirement already satisfied: click>=7 in ./.venv/lib/python3.11/site-packages (from rich-click~=1.6->ovos-config<0.1.0,>=0.0.8->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (8.1.7)
Requirement already satisfied: rich>=10.7.0 in ./.venv/lib/python3.11/site-packages (from rich-click~=1.6->ovos-config<0.1.0,>=0.0.8->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (13.7.0)
Requirement already satisfied: typing-extensions in ./.venv/lib/python3.11/site-packages (from rich-click~=1.6->ovos-config<0.1.0,>=0.0.8->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (4.8.0)
Requirement already satisfied: markdown-it-py>=2.2.0 in ./.venv/lib/python3.11/site-packages (from rich>=10.7.0->rich-click~=1.6->ovos-config<0.1.0,>=0.0.8->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (3.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in ./.venv/lib/python3.11/site-packages (from rich>=10.7.0->rich-click~=1.6->ovos-config<0.1.0,>=0.0.8->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (2.17.1)
Requirement already satisfied: mdurl~=0.1 in ./.venv/lib/python3.11/site-packages (from markdown-it-py>=2.2.0->rich>=10.7.0->rich-click~=1.6->ovos-config<0.1.0,>=0.0.8->ovos-plugin-manager>=0.0.1->ovos-PHAL-plugin-respeaker-2mic==0.0.1->-r /home/ovos/.config/mycroft/phal.list (line 1)) (0.1.2)
Building wheels for collected packages: spidev
  Building wheel for spidev (pyproject.toml): started
  Building wheel for spidev (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Building wheel for spidev (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      /tmp/pip-build-env-z286hjoy/overlay/lib/python3.11/site-packages/setuptools/dist.py:472: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!

              ********************************************************************************
              Usage of dash-separated 'description-file' will not be supported in future
              versions. Please use the underscore name 'description_file' instead.

              By 2024-Sep-26, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************

      !!
        opt = self.warn_dash_deprecation(opt, section)
      running bdist_wheel
      running build
      running build_ext
      building 'spidev' extension
      creating build
      creating build/temp.linux-aarch64-cpython-311
      aarch64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/home/ovos/.venv/include -I/usr/include/python3.11 -c spidev_module.c -o build/temp.linux-aarch64-cpython-311/spidev_module.o
      error: command 'aarch64-linux-gnu-gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for spidev
Failed to build spidev
ERROR: Could not build wheels for spidev, which is required to install pyproject.toml-based projects
2023-11-25 21:39:28.863 - PHAL - ovos_PHAL.service:on_started:25 - INFO - PHAL is started
2023-11-25 21:39:28.900 - PHAL - ovos_bus_client.session:from_message:447 - WARNING - No session context in message:connected
2023-11-25 21:39:29.015 - PHAL - ovos_PHAL.service:load_plugins:83 - INFO - PHAL plugin loaded: ovos-phal-plugin-ipgeo
2023-11-25 21:39:29.090 - PHAL - ovos_PHAL.service:load_plugins:83 - INFO - PHAL plugin loaded: ovos-PHAL-plugin-alsa
2023-11-25 21:39:29.097 - PHAL - ovos_PHAL.service:load_plugins:83 - INFO - PHAL plugin loaded: ovos-PHAL-plugin-system
2023-11-25 21:39:29.100 - PHAL - ovos_PHAL.service:on_ready:9 - INFO - PHAL is ready.
goldyfruit commented 9 months ago

I added RPi.GPIO, spidev and wheel to the image.

To fix the issue in your current image (without having to re-deploy), run the following commands:

docker exec -u0 ovos_phal apt update
docker exec -u0 ovos_phal apt install build-essential python3-dev -y
docker exec ovos_phal pip install git+https://github.com/OpenVoiceOS/ovos-PHAL-plugin-respeaker-2mic.git
goldyfruit commented 9 months ago

Fixed