Skip to content

Instantly share code, notes, and snippets.

@jiaaro
Last active May 2, 2024 10:15
Show Gist options
  • Save jiaaro/9767512210a1d80a8a0d to your computer and use it in GitHub Desktop.
Save jiaaro/9767512210a1d80a8a0d to your computer and use it in GitHub Desktop.
How to install PyAudio into a VirtualEnv on Mac OS X 10.10

Install portaudio using homebrew (or method of your choice)

brew install portaudio

create $HOME/.pydistutils.cfg using the include and lib directories of your portaudio install:

[build_ext]
include_dirs=/Users/jrobert1271/homebrew/Cellar/portaudio/19.20140130/include/
library_dirs=/Users/jrobert1271/homebrew/Cellar/portaudio/19.20140130/lib/

Then in your virtualenv:

pip install --allow-external pyaudio --allow-unverified pyaudio pyaudio
@esantonja
Copy link

@ccarstens Thanks! worked for me!

@jpaxer
Copy link

jpaxer commented Jan 18, 2023

pip install --allow-external pyaudio --allow-unverified pyaudio pyaudio doesn't work for me. It says:

Usage:   
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --allow-unverified
```   FYI, I followed the steps in the original post.

 I am using MacOS Ventura 13.0 and need pyaudio for speechRecognition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment