Windows OS

I Can’t Install PyAudio on Windows. How to Solve the “Error”?

PyAudio is an open-source, cross-platform tool that allows users to play and record audio in Python. With this application, you can create multiple audio applications. Since it’s a cross-platform tool, you can install it on any operating system, including Windows and the Command Prompt.

While installing PyAudio on a Windows system through python and pip commands, you may experience an error, which can be related to a “no python module” found or a “Microsoft Visual C++” error.

If you are experiencing an error while installing PyAudio on a Windows system, follow this guide to fix it.

I can’t Install PyAudio on Windows. How to solve the “error”?

PyAudio can be installed on the Windows system from Command Prompt through the following command:

python3 -m pip install PyAudio

The PyAudio requires Python and a pip module that must be installed on your system. Suppose you perform the installation directly without installing Python and pip. In that case, you will get an error:

To fix the “Python was not found” error, just type the command “python” and it will open the Microsoft store, where you can install Python globally on your Windows system.

You can confirm the Python version using the following command:

python --version

Once the Python is installed, you can then perform the installation again using the following command in the Command Prompt.

python3 -m pip install PyAudio

Note: In some cases, the users may experience a “Microsoft Visual C++” error. They can fix it by installing the latest version of Microsoft Visual C++ on the Windows system from here. It’s a compiler that allows users to compile source code written in C and C++ language, and during the installation of PyAudio, you may need this compiler.

Conclusion

PyAudio on Windows systems requires Python and Microsoft Visual C++. Thus, it’s better to install both these modules on your system to install PyAudio without an error successfully. The above guidelines show the method to fix PyAudio install error, which can occur on Windows systems having no Python or Microsoft Visual C++ installed. If you experience the same type of error, you can follow the link given in the above guidelines to install Python and Visual C++ on the Windows system successfully.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.