Can't Install PyAudio in hugging face

The Logs output this when trying to install PyAudio

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/gcc' failed with exit code 1

I have also tried predownloading wheels but it outputs

ERROR: PyAudio-0.2.11-cp311-cp311-win32.whl is not a supported wheel on this platform.

PyAudio uses PortAudio v19 under the hood, so create packages.txt and the portaudio19-dev line to it (and pyaudio to requirements.txt) to install it

1 Like