I created my first toolbox:
toolbox create groundstation
and toolbox enter groundstation
then installed pip via sudo dnf install pip3
.
Then I ran this command to install some more stuff I need to run a python script:
pip3 install opencv-python Pillow matplotlib basemap pymavlink haversine pyaudio pyserial
But pyaudio fails to install:
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyaudio (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-312
creating build/lib.linux-x86_64-cpython-312/pyaudio
copying src/pyaudio/__init__.py -> build/lib.linux-x86_64-cpython-312/pyaudio
running build_ext
building 'pyaudio._portaudio' extension
creating build/temp.linux-x86_64-cpython-312
creating build/temp.linux-x86_64-cpython-312/src
creating build/temp.linux-x86_64-cpython-312/src/pyaudio
gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fPIC -I/usr/local/include -I/usr/include -I/usr/include/python3.12 -c src/pyaudio/device_api.c -o build/temp.linux-x86_64-cpython-312/src/pyaudio/device_api.o
error: command '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 pyaudio
Failed to build pyaudio
ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects
Googling shows people solved it by installing portaudio19-dev
but I can’t install that:
sudo dnf install portaudio19-dev
Last metadata expiration check: 0:03:47 ago on Fri 02 Aug 2024 16:42:08 CEST.
No match for argument: portaudio19-dev
Error: Unable to find a match: portaudio19-dev
How to install pyaudio via pip in a Toolbox?