How to install AudioLib and PyAudio if simple pip install fails.

Python Library

3 Minute Read

!Disclaimer: Linux commands.

How do you install AudioLib? pip install AudioLib, simple. OR So, I thought!

Building wheel for pyaudio (setup.py) ... error ERROR: Command errored out with exit status 1: ERROR: Failed building wheel for pyaudio Failed to build pyaudio

I was met with these errors. If you were also met with similar errors you are at the right place. Let's just get right into it.

Before you install AudioLib, you need to install PyAudio. Basically this article is just how to install PyAudio + pip install AudioLib.

Step 1

You need to install portaudio modules:

sudo apt-get install libasound-dev

Install Portaudio Modules

Step 2

Download the portaudio archive from: http://files.portaudio.com/download.html The good folks at PortAudio has made it easy for us, you just download the one with "You probably want this!!" label.

Unzip it. Remember the directory.

Step 3

On the terminal enter the directory using cd. If you have unziped the archive in the Downloads folder and if you have not changed the default name of the archive or the folder then use the below commands.

cd Downloads/ cd pa_stable_v190700_20210406/ cd portaudio/

Third Step

Step 4

Run:

./configure && make

Fourth Step

Step 5

Run:

sudo make install

Fifth Step

Step 6

Tada... Install PyAudio

sudo pip install pyaudio

Step 7

Now, Install AudioLib

sudo pip install AudioLib

Viola! ✨

About Author

Adith G M

You got the world on its knees, you’re taking all that you please, you want more! you want more? But you’ll get nothing from me!!

Latest Posts