-3

How can i install pyaudio on visual studio

I tried pip install pyaudio but i'm getting error

after that i downloaded pyaudio files but not able to install them provide me a solution

AcK
  • 2,063
  • 2
  • 20
  • 27

2 Answers2

1

Possible duplicate: I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."?

There are many ways to do this, I will tell here two.


Install PyAudio using pipwin

pip install pipwin
pipwin install pyaudio

This is the simple way. If it doesn't work follow the below method.


Install PyAudio using wheel

  1. First check your python version. Check python version
  2. Go to this website: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
  3. Find and download the correct version of your Python wheel. Here I will choose 3.7 and 64 bit.
  4. This would be the right wheel for me: PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl
  5. Open any terminal in the downloaded folder and install it with the help of this command.

pip install PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl

Note: Here instead of my wheel name, write the name of your wheel.

Reference: pyaudio install error windows | pyaudio error microsoft visual c++ 14.0 is required

Kheersagar patel
  • 383
  • 3
  • 15
  • I tried it but dont know why this is downloading an amd – BHARAT P S CHAUHAN Sep 24 '21 at 08:40
  • can you tell me your python version and bit so that I can help you well – Kheersagar patel Sep 24 '21 at 09:02
  • python 3.9.7 file name which i downloaded is PyAudio-0.2.11-cp39-cp39-win_amd64 and after running following command in CMD C:\Users\bharat chauhan>pip install C:\Users\bharat chauhan\AppData\Local\Programs\Python\Python39\Scripts\PyAudio-0.2.11-cp39-cp39-win_amd64.whl i'm getting error ERROR: Invalid requirement: 'C:\\Users\\bharat' Hint: It looks like a path. File 'C:\Users\bharat' does not exist. – BHARAT P S CHAUHAN Sep 25 '21 at 07:25
  • You have to write the path inside the quote. Like this: `pip install "C:\Users\bharat chauhan\AppData\Local\Programs\Python\Python39\Scripts\PyAudio-0.2.11-cp39-cp39-win_amd64.whl"` Copy and paste this command. after that it will work. – Kheersagar patel Sep 25 '21 at 11:40
0

I have successfully installed it....

just paste downloaded .whl file at C:\Users\bharat chauhan\AppData\Local\Programs\Python\Python39\Scripts & fromr here open cmd & run command pip install file name