Error during Picar X Python installation

Hi, I’m trying to install all the Python modules for a Picar X with Rasp Pi4, and I am getting the following error. Any ideas?

Building wheel for pyaudio (pyproject.toml): started

Building wheel for pyaudio (pyproject.toml): finished with status ‘error’

error: subprocess-exited-with-error

× Building wheel for pyaudio (pyproject.toml) did not run successfully.

│ exit code: 1

╰─> [27 lines of output]

/tmp/pip-build-env-5luzoak8/overlay/local/lib/python3.13/dist-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.

!!

********************************************************************************

Please consider removing the following classifiers in favor of a SPDX license expression:

License :: OSI Approved :: MIT License

See Writing your pyproject.toml - Python Packaging User Guide 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/usr/include/python3.13 -c src/pyaudio/device_api.c -o build/temp.linux-aarch64-cpython-313/src/pyaudio/device_api.o

src/pyaudio/device_api.c:9:10: fatal error: portaudio.h: No such file or directory

9 | #include “portaudio.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

DEPRECATION: Building ‘srt’ using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `–use-pep517` option, (possibly combined with `–no-build-isolation`), or adding a `pyproject.toml` file to the source tree of ‘srt’. Discussion can be found at

Building wheel for srt (setup.py): started

Building wheel for srt (setup.py): finished with status ‘done’

Created wheel for srt: filename=srt-3.5.3-py3-none-any.whl size=22511 sha256=26c69daece8fbbac55de88e47b7b21438b2ddb0fda228fdb81d641371ee0e0ee

Stored in directory: /root/.cache/pip/wheels/ed/9d/54/8e040c593adecbf10de5a6263add15cfefff5a033e33fda8c6

Successfully built robot_hat sunfounder-voice-assistant srt

Failed to build pyaudio

ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyaudio)

Try to fix it yourself, or contact service@sunfounder.com with this message

SunFounder_Moderator

1m

To help us analyze and resolve the issue, please provide the complete error messages from your installation process.
Meanwhile, we recommend the following steps:
Install the latest version of the Raspberry Pi OS.

Follow the correct tutorial to install all library codes from this guide:

If you encounter an error during the first installation of the robot_hat library, please try running the sudo python3 install.py command again. This often resolves the issue.

Okay, I tried running the install command again, and that seemed to work. I will continue with the setup and make sure everything is functional