Question/Issue:
When following the tutorial instructions found here…
…I get errors when I try to install pyaudio in the virtual environment…
$ pip install --upgrade pip pyaudio six
Fails…
Project ID:
Context/Use case:
When trying to repeat the OCR Detect/Recognize tutorial
Expected Outcome:
Installation of pyaudio package
Actual Outcome:
Installation fails with errors
Reproducibility:
- [*] Always
- [ ] Sometimes
- [ ] Rarely
Environment:
- Platform: Uno-Q 4GB
Additional Information:
[Any other information that might be relevant]
Action and error message output.
(dje-venv) arduino@dje-uno-Q:~/ocr-linux-arduino-uno-q$ pip install pyaudio
Collecting pyaudio
Using cached PyAudio-0.2.14.tar.gz (47 kB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … done
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
╰─> [28 lines of output]
/tmp/pip-build-env-2hmc26nm/overlay/lib/python3.13/site-packages/setuptools/dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running bdist_wheel
running build
running build_py
creating build/lib.linux-aarch64-cpython-313/pyaudio
copying src/pyaudio/__init__.py -> build/lib.linux-aarch64-cpython-313/pyaudio
running build_ext
building 'pyaudio._portaudio' extension
creating build/temp.linux-aarch64-cpython-313/src/pyaudio
aarch64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/usr/local/include -I/usr/include -I/home/arduino/ocr-linux-arduino-uno-q/dje-venv/include -I/usr/include/python3.13 -c src/pyaudio/device_api.c -o build/temp.linux-aarch64-cpython-313/src/pyaudio/device_api.o
In file included from src/pyaudio/device_api.c:1:
src/pyaudio/device_api.h:7:10: fatal error: Python.h: No such file or directory
7 | #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
Failed to build pyaudio
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyaudio)
(dje-venv) arduino@dje-uno-Q:~/ocr-linux-arduino-uno-q$
