Error downloading pyaudio

Error when downloading pyaudio:

pip install pyaudio
ERROR: Command errored out with exit status 1:
     command: 'c:\users\clcla\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\clcla\\AppData\\Local\\Temp\\pip-install-l7hgrezp\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\clcla\\AppData\\Local\\Temp\\pip-install-l7hgrezp\\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\clcla\AppData\Local\Temp\pip-record-05j14jsb\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\clcla\appdata\local\programs\python\python38\Include\pyaudio'
         cwd: C:\Users\clcla\AppData\Local\Temp\pip-install-l7hgrezp\pyaudio\
    Complete output (17 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
    creating build\temp.win-amd64-3.8
    creating build\temp.win-amd64-3.8\Release
    creating build\temp.win-amd64-3.8\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMS_WIN64=1 -Ic:\users\clcla\appdata\local\programs\python\python38\include -Ic:\users\clcla\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.8\Release\src/_portaudiomodule.obj
    _portaudiomodule.c
    c:\users\clcla\appdata\local\programs\python\python38\include\pyconfig.h(117): warning C4005: MS_WIN64: Ё§¬Ґ­Ґ­ЁҐ ¬ Єа®®ЇаҐ¤Ґ«Ґ­Ёп
    src/_portaudiomodule.c: note: б¬. ЇаҐ¤л¤г饥 ®ЇаҐ¤Ґ«Ґ­ЁҐ "MS_WIN64"
    src/_portaudiomodule.c(29): fatal error C1083: ЌҐ г¤ Ґвбп ®вЄалвм д ©« ўЄ«о祭ЁҐ: portaudio.h: No such file or directory,
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\clcla\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\clcla\\AppData\\Local\\Temp\\pip-install-l7hgrezp\\pyaudio\\setup.py'"'"'; __file__='"'"'C:\\Users\\clcla\\AppData\\Local\\Temp\\pip-install-l7hgrezp\\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\clcla\AppData\Local\Temp\pip-record-05j14jsb\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\clcla\appdata\local\programs\python\python38\Include\pyaudio' Check the logs for full command output.
Author: nomnoms12, 2020-04-20

1 answers

In pip, the case is very important in the library name. Purely hypothetically, pyaudio and PyAudio may be completely different libraries, but this is so, by the way. Most likely, the problem will be solved simply by writing the command like this: pip install PyAudio, instead of your pip install pyaudio. PS: for further correct spelling of library names, see the download command in PyPI.

 0
Author: Андрей Карчевский, 2020-04-20 21:30:52