-2

While I was making a Virtual Assistant, the code editor said a module named PyAudio is required. So, I opened the terminal and typed ...pip install PyAudio...

and it showed me:

Collecting PyAudio
  Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: PyAudio
  Building wheel for PyAudio (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\agniva roy\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Agniva Roy\\AppData\\Local\\Temp\\pip-install-xo7mfu1k\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Agniva Roy\\AppData\\Local\\Temp\\pip-install-xo7mfu1k\\pyaudio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Agniva Roy\AppData\Local\Temp\pip-wheel-uf1qmafg'
       cwd: C:\Users\Agniva Roy\AppData\Local\Temp\pip-install-xo7mfu1k\pyaudio\
  Complete output (9 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.8
  copying src\pyaudio.py -> build\lib.win-amd64-3.8
  running build_ext
  building '_portaudio' extension
  error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
  ----------------------------------------
  ERROR: Failed building wheel for PyAudio
  Running setup.py clean for PyAudio
Failed to build PyAudio
DEPRECATION: Could not build wheels for PyAudio which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: PyAudio
    Running setup.py install for PyAudio ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\agniva roy\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Agniva Roy\\AppData\\Local\\Temp\\pip-install-xo7mfu1k\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Agniva Roy\\AppData\\Local\\Temp\\pip-install-xo7mfu1k\\pyaudio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Agniva Roy\AppData\Local\Temp\pip-record-0q8d47m5\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\agniva roy\Include\PyAudio'
         cwd: C:\Users\Agniva Roy\AppData\Local\Temp\pip-install-xo7mfu1k\pyaudio\
    Complete output (9 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    copying src\pyaudio.py -> build\lib.win-amd64-3.8
    running build_ext
    building '_portaudio' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\agniva roy\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Agniva Roy\\AppData\\Local\\Temp\\pip-install-xo7mfu1k\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\Agniva Roy\\AppData\\Local\\Temp\\pip-install-xo7mfu1k\\pyaudio\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Agniva Roy\AppData\Local\Temp\pip-record-0q8d47m5\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\agniva roy\Include\PyAudio' Check the logs for full command output.

Please help me out. I have even tried installing pre-build the pyaudio wheels but it doesn't work either.

Ahmet
  • 7,527
  • 3
  • 23
  • 47
Matrix
  • 25
  • 1
  • 6
  • 3
    "_Microsoft Visual C++ 14.0 is required_" download and install this and check? – Delrius Euphoria Aug 10 '20 at 09:48
  • 1
    Dear welcome to Stackoverflow , This question is already answered [here](https://stackoverflow.com/questions/52283840/i-cant-install-pyaudio-on-windows-how-to-solve-error-microsoft-visual-c-14) – Imran Aug 10 '20 at 09:55
  • 1
    Does this answer your question? [I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."?](https://stackoverflow.com/questions/52283840/i-cant-install-pyaudio-on-windows-how-to-solve-error-microsoft-visual-c-14) – Peyman Majidi Aug 10 '20 at 09:58

1 Answers1

0

you already have the answer in your description

error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

Download Microsoft c++ dependencies from Microsoft website

and redo the build