PyAudio习惯于

2024-03-28 15:49:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试开发自己的数字助理,以增加语音识别我必须安装pyAudio,但当我尝试它的答复是下面的代码。如果您有任何解决方案,请回复。你知道吗

提前谢谢, 阿什滕

回复的代码是:

Collecting PyAudio
  Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz
Installing collected packages: PyAudio
  Running setup.py install for PyAudio ... error
    Complete output from command c:\users\ashte\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ashte\\AppData\\Local\\Temp\\pip-install-beegcfuy\\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\ashte\AppData\Local\Temp\pip-record-f2gcy2x_\install-record.txt --single-version-externally-managed --compile:
    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\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\ashte\appdata\local\programs\python\python37-32\include -Ic:\users\ashte\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program
Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win32-3.7\Release\src/_portaudiomodule.obj
    _portaudiomodule.c
    src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\users\ashte\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ashte\\AppData\\Local\\Temp\\pip-install-beegcfuy\\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\ashte\AppData\Local\Temp\pip-record-f2gcy2x_\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\ashte\AppData\Local\Temp\pip-install-beegcfuy\PyAudio\

Tags: installpybuildincludefilesrecordprogramusers