首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >无法在Visual Studio代码中安装PyAudio

无法在Visual Studio代码中安装PyAudio
EN

Stack Overflow用户
提问于 2019-05-16 00:22:22
回答 1查看 0关注 0票数 0

我尝试使用Visual Studio代码安装PyAudio

pip install PyAudio

(这个错误来了)

代码语言:javascript
复制
Collecting PyAudio
  Downloading 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
    ERROR: Complete output from command 'c:\users\payload player\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\PAYLOA~1\\AppData\\Local\\Temp\\pip-install-vytdlgz3\\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\PAYLOA~1\AppData\Local\Temp\pip-record-0pn7or0v\install-record.txt' --single-version-externally-managed --compile:
    ERROR: 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
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command "'c:\users\payload player\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\PAYLOA~1\\AppData\\Local\\Temp\\pip-install-vytdlgz3\\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\PAYLOA~1\AppData\Local\Temp\pip-record-0pn7or0v\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\PAYLOA~1\AppData\Local\Temp\pip-install-vytdlgz3\PyAudio\
EN

回答 1

Stack Overflow用户

发布于 2019-05-16 10:06:53

错误消息有答案。

您需要安装Visual C ++生成工具。但是,错误消息中的链接似乎毫无用处。你可以在这里下载:https//visualstudio.microsoft.com/visual-cpp-build-tools/

事情应该适用于较新版本的Visual C ++。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100006733

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档