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

问题描述 投票:-3回答:1

这是输出:

running build_py
creating build
creating build\lib.win-amd64-3.7
copying src\pyaudio.py -> build\lib.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:\users\vishwas\appdata\local\programs\python\python37\python.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('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Vishwas\AppData\Local\Temp\pip-record-8gf9jsxc\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Vishwas\AppData\Local\Temp\pip-install-g9skf8fa\PyAudio\

“它与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:\users\vishwas\appdata\local\programs\python\python37\python.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('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Vishwas\AppData\Local\Temp\pip-record-8gf9jsxc\install-record.txt --single-version-externally-managed --compile:                                                                                                             running install                                                                                                         running build                                                                                                           running build_py                                                                                                        creating build                                                                                                          creating build\lib.win-amd64-3.7                                                                                        copying src\pyaudio.py -> build\lib.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:\users\vishwas\appdata\local\programs\python\python37\python.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('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Vishwas\AppData\Local\Temp\pip-record-8gf9jsxc\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Vishwas\AppData\Local\Temp\pip-install-g9skf8fa\PyAudio\
python-3.x pip setup.py pyaudio
1个回答
1
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.