1

I'm trying to install PyAudio for an application to record audio clips from microphone input. I installed PyAudio from executable file (Windows 7, python 2.6). However when I try to import this library in my code, I get the following error.

Please build and install the PortAudio Python bindings first.

I tried the solution provided at Python PyAudio installation problems (with PortAudio) but I got the following error message when I installed it using the executable given at http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio

Traceback (most recent call last):
  in <module>
    import pyaudio
  File "C:\Python26\lib\site-packages\pyaudio.py", line 99, in <module>
    import _portaudio as pa
ImportError: DLL load failed: %1 is not a valid Win32 application.

I tried building the PortAudio v19 but It also did not work for me. I'm stuck at this point and I'll appreciate any help in this regard.

Community
  • 1
  • 1
codeMonk
  • 11
  • 1
  • 3

1 Answers1

0

For this you need to first install brew. Check this link. Then, write in your command

brew install portaudio

Once portaudio is installed, run

pip install python-pyaudio
Antoine Boisier-Michaud
  • 1,402
  • 2
  • 14
  • 27
Prateek Saini
  • 318
  • 2
  • 8