0
In file included from src/pyaudio/device_api.c:1:
      In file included from src/pyaudio/device_api.h:7:
      /Library/Frameworks/Python.framework/Versions/3.13/include/python3.13/Python.h:19:10: fatal error: 'assert.h' file not found
         19 | #include <assert.h>               // assert()
            |          ^~~~~~~~~~
      1 error generated.
      error: command '/Library/Developer/CommandLineTools/usr/bin/clang' 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)

I tried every method possible but can't resolve the issue.

1
  • The error message is clear, the system is missing a header file that is required to build the pyaudio package. Check your compiler and sdk locations are setup correctly, and your path variable locates them. Commented Mar 4 at 11:03

1 Answer 1

0

PyAudio depends on the portaudio library. On macOS, you need to use Homebrew to install the prerequisite portaudio library:

brew install portaudio

before installing PyAudio using pip:

pip install pyaudio

See the docs.

Sign up to request clarification or add additional context in comments.

1 Comment

tried it too but not working

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.