How i fix this problem while downloading pyaudio in my mac m1 please help me i tried every thing but not work

" 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"



HOW I CAN FIXX THIS???????


Posted on Jul 15, 2023 9:27 PM

Reply
Question marked as Top-ranking reply

Posted on Jul 15, 2023 10:34 PM

It doesn’t appear you have the build tools including clang available.


The xcode-select install command shown below is needed once, and installs the build tools.


Supposedly, this is the Homebrew install sequence:

xcode-select --install
brew remove portaudio
brew install portaudio
pip3 install pyaudio


If you don’t have Homebrew installed, the directions for installing that are here:


https://brew.sh/


I’d suggest contacting whoever is maintaining the pyAudio port for assistance, if your difficulties here persist..


https://people.csail.mit.edu/hubert/pyaudio/


That webpage also indicates you need PyAudio 0.2.13 or later for Apple silicon.

3 replies
Question marked as Top-ranking reply

Jul 15, 2023 10:34 PM in response to bhakland

It doesn’t appear you have the build tools including clang available.


The xcode-select install command shown below is needed once, and installs the build tools.


Supposedly, this is the Homebrew install sequence:

xcode-select --install
brew remove portaudio
brew install portaudio
pip3 install pyaudio


If you don’t have Homebrew installed, the directions for installing that are here:


https://brew.sh/


I’d suggest contacting whoever is maintaining the pyAudio port for assistance, if your difficulties here persist..


https://people.csail.mit.edu/hubert/pyaudio/


That webpage also indicates you need PyAudio 0.2.13 or later for Apple silicon.

Jul 16, 2023 8:24 AM in response to bhakland

The last revision of pyaudio (Dec 2022) supports Python 3.11, and the version of Python3 that Apple continues to install from the command line tools is Python 3.9.6. If the pyaudio developer expects features from a full Python 3.11 distro that are not yet present in Python 3.9.6, or that Apple has omitted from its Python 3.9.6 distribution, then you may encounter issues. Hopefully not.


Once you have installed pyaudio, you can see more details about it and its location on your drive:


/usr/bin/pip3 show pyaudio


and to keep it updated in the future:


/usr/bin/pip3 install -U pyaudio




This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How i fix this problem while downloading pyaudio in my mac m1 please help me i tried every thing but not work

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.