我没有将 pyaudio 库安装到我的系统中



这是输出:

running build_py
creating build
creating buildlib.win-amd64-3.7
copying srcpyaudio.py -> buildlib.win-amd64-3.7
running build_ext
building '_portaudio' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/  
Command "c:usersvishwasappdatalocalprogramspythonpython37python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\Vishwas\AppData\Local\Temp\pip-install-g9skf8fa\PyAudio\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersVishwasAppDataLocalTemppip-record-8gf9jsxcinstall-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:UsersVishwasAppDataLocalTemppip-install-g9skf8faPyAudio

"它与 python 和 c++ 的关系在哪里">

我甚至easy_install尝试了所有方法,但没有奏效:

pip install 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:usersvishwasappdatalocalprogramspythonpython37python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\Vishwas\AppData\Local\Temp\pip-install-g9skf8fa\PyAudio\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersVishwasAppDataLocalTemppip-record-8gf9jsxcinstall-record.txt --single-version-externally-managed --compile:                                                                                                             running install                                                                                                         running build                                                                                                           running build_py                                                                                                        creating build                                                                                                          creating buildlib.win-amd64-3.7                                                                                        copying srcpyaudio.py -> buildlib.win-amd64-3.7                                                                       running build_ext                                                                                                       building '_portaudio' extension                                                                                         error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/                                                                                                                                                                                                                             ----------------------------------------                                                                            Command "c:usersvishwasappdatalocalprogramspythonpython37python.exe -u -c
"import setuptools, tokenize;__file__='C:\Users\Vishwas\AppData\Local\Temp\pip-install-g9skf8fa\PyAudio\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersVishwasAppDataLocalTemppip-record-8gf9jsxcinstall-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:UsersVishwasAppDataLocalTemppip-install-g9skf8faPyAudio

看起来Micrsoft Studio的构建工具对于某些依赖项是必需的。因此,从错误消息中的链接安装它们应该没有问题。

相关内容

  • 没有找到相关文章

最新更新