PyAudio provides Python bindings for PortAudio, the cross-platform audio I/O library. With PyAudio, you can easily use Python to play and record audio on a variety of platforms.
In this article, we will see how to install PyAudio on Python 3.7. The simple pip command
pip install pyaudio may lead to errors. We are using an alternative method for installing PyAudio in a Python 3.7 environment.
Follow the steps to install PyAudio in Windows system:
- Find your Python version by
python --version, the easiest way to check either you have 64 or 32 Python just open it in the terminal
- Find the appropriate
.whlfile from here. The appropriate files for Python 3.7 will be as follows. Download the required file.
- PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl — for 64 bit machine
- PyAudio‑0.2.11‑cp37‑cp37m‑win32.whl — for 64 bit machine
- Go to the folder where it is downloaded using
cdcommand in cmd.
- Install the
pip, for example :
pip install PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl
You have successfully installed PyAudio in your Windows machine.