Python Voice Assistant

Making a voice assistant with this video: https://www.youtube.com/watch?v=YeS755SPSI8&t But it is not possible to install PyAudio either through the command line or through the source code: Command line error when pip:

  Using cached PyAudio-0.2.11.tar.gz (37 kB)
Installing collected packages: PyAudio
    Running setup.py install for PyAudio ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\andre\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\andre\\AppData\\Local\\Temp\\pip-install-sx95mwwt\\PyAudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\andre\\AppData\\Local\\Temp\\pip-install-sx95mwwt\\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\andre\AppData\Local\Temp\pip-record-lnfiwt6q\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\andre\appdata\local\programs\python\python37-32\Include\PyAudio'
         cwd: C:\Users\andre\AppData\Local\Temp\pip-install-sx95mwwt\PyAudio\
    Complete output (15 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.7
    copying src\pyaudio.py -> build\lib.win32-3.7
    running build_ext
    building '_portaudio' extension
    creating build\temp.win32-3.7
    creating build\temp.win32-3.7\Release
    creating build\temp.win32-3.7\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\users\andre\appdata\local\programs\python\python37-32\include -Ic:\users\andre\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win32-3.7\Release\src/_portaudiomodule.obj
    _portaudiomodule.c
    src/_portaudiomodule.c(27): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\andre\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\andre\\AppData\\Local\\Temp\\pip-install-sx95mwwt\\PyAudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\andre\\AppData\\Local\\Temp\\pip-install-sx95mwwt\\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\andre\AppData\Local\Temp\pip-record-lnfiwt6q\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\andre\appdata\local\programs\python\python37-32\Include\PyAudio' Check the logs for full command output.

When I do it through the source code and write on the command line: pip install PyAudio-0.2.11-cp27-cp27m-win_amd64. whl Writes:

ERROR: PyAudio-0.2.11-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.

What should I do?

Author: nomnoms12, 2020-04-27

1 answers

Try downloading the Microsoft Visual C++ redistributable component for Visual Studio 2019 and try installing it again:

python -m pip install -U PyAudio

UPD:

x64: https://aka.ms/vs/16/release/VC_redist.x64.exe
ARM64: https://aka.ms/vs/16/release/VC_redist.arm64.exe
x86: https://aka.ms/vs/16/release/VC_redist.x86.exe

 0
Author: nomnoms12, 2020-04-27 15:28:32