简体   繁体   English

安装Microsoft Visual C ++ 14.0后,我无法在我的计算机中安装pyaudio,并且安装了python版本3.7。

[英]I am not able to install pyaudio in my machine , having python version 3.7 after intalling the microsoft visual c++ 14.0.?

i have installed the visual studio 2019 build tool , c++. 我已经安装了Visual Studio 2019构建工具c ++。 Still i am having the problem in my cmd prompt, shown below. 我的cmd提示中仍然有问题,如下所示。

  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
    ERROR: Complete output from command 'c:\users\nisith saha\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\NISITH~1\\AppData\\Local\\Temp\\pip-install-p2pi0hy3\\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\NISITH~1\AppData\Local\Temp\pip-record-7qtci57w\install-record.txt' --single-version-externally-managed --compile:
    ERROR: 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
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DMS_WIN64=1 "-Ic:\users\nisith saha\appdata\local\programs\python\python37\include" "-Ic:\users\nisith saha\appdata\local\programs\python\python37\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcsrc/_portaudiomodule.c /Fobuild\temp.win-amd64-3.7\Release\src/_portaudiomodule.obj
    _portaudiomodule.c
    c:\users\nisith saha\appdata\local\programs\python\python37\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
    src/_portaudiomodule.c: note: see previous definition of 'MS_WIN64'
    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\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.21.27702\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command "'c:\users\nisith saha\appdata\local\programs\python\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\NISITH~1\\AppData\\Local\\Temp\\pip-install-p2pi0hy3\\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\NISITH~1\AppData\Local\Temp\pip-record-7qtci57w\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\NISITH~1\AppData\Local\Temp\pip-install-p2pi0hy3\pyaudio\

You will also need the Portaudio development headers and libraries installed. 您还将需要安装Portaudio开发标头和库。

Instead of doing that, I think you'll find it easier to get the proper precompiled wheel for Py3.7 from Christoph Gohlke's site over here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio 除了这样做,我想您会发现从Christoph Gohlke的站点上为Py3.7正确地预编译的车轮变得更加容易: https ://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio

The wheel you'll want should be PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl . 您需要的转盘应该是PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl I won't hotlink to it since it's expressly discouraged by Gohlke. 我不会对其进行热链接,因为Gohlke明确建议不要使用它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我无法在 Windows 上安装 pyaudio? 如何解决“错误:需要 Microsoft Visual C++ 14.0。”? - I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."? 安装 pyaudio 时出错:需要 Microsoft Visual C++ 14.0 - Error Installing pyaudio: Microsoft Visual C++ 14.0 is required 为PyAthenaJDBC安装Microsoft Visual C ++ 14.0 - install Microsoft Visual C++ 14.0 for PyAthenaJDBC 我正在尝试使用 pip install Scrapy 安装scrapy。 但我收到错误,因为需要 Microsoft Visual C++ 14.0 - I am trying to install scrapy using pip install Scrapy. but i am getting error as Microsoft Visual C++ 14.0 is required 我收到“错误:安装 pocketsphinx 时 python 3.6.1 需要 Microsoft Visual C++ 14.0 - I am getting "error: Microsoft Visual C++ 14.0 is required on python 3.6.1 while installing pocketsphinx 当我 pip 安装泡菜时,我遇到了这个错误错误:需要 Microsoft Visual C++ 14.0 或更高版本。 使用“Microsoft C++ 构建工具”获取它: - When I pip install pickle I am facing this error error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": 收到“错误:需要 Microsoft Visual C++ 14.0”。 安装 PyAudio 时 - Getting “error: Microsoft Visual C++ 14.0 is required.” when installing PyAudio 如何在没有 Microsoft Visual c++ 14.0 的 Windows 上为 python 3.6 安装 h5py - How to install h5py for python 3.6 on windows without Microsoft Visual c++ 14.0 无法使用pip安装python软件包,需要获取Microsoft Visual C ++ 14.0 - Unable to install python package with pip, getting Microsoft Visual C++ 14.0 is required 需要 Microsoft Visual C++ 14.0 - 错误 - pip install fbprophet - Microsoft Visual C++ 14.0 is required - error - pip install fbprophet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM