猿问

无法安装 Pyaudio

无法在我的 python 3.7 中安装 Pyaudio ..甚至尝试安装 Visual C++。


pip install pyaudio

Collecting pyaudio

  Using cached https://files.pythonhosted.org/packages/ab/42/b4f04721c5c5bfc196ce156b3c768998ef8c0ae3654ed29ea5020c749a6b/PyAudio-0.2.11.tar.gz

Building wheels for collected packages: pyaudio

  Running setup.py bdist_wheel for pyaudio

  Complete output from command "c:\users\vicky kumar\appdata\local\programs\python\python37\python.exe" -c "import setuptools;__file__='C:\\Users\\VICKYK~1\\AppData\\Local\\Temp\\pip-build-5v23nswh\\pyaudio\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\VICKYK~1\AppData\Local\Temp\tmprsn0men8pip-wheel-:

  running bdist_wheel

  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": http://landinghub.visualstudio.com/visual-cpp-build-tools


  ----------------------------------------

  Failed building wheel for pyaudio

Failed to build pyaudio

Installing collected packages: pyaudio

  Running setup.py install for pyaudio

    Complete output from command "c:\users\vicky kumar\appdata\local\programs\python\python37\python.exe" -c "import setuptools, tokenize;__file__='C:\\Users\\VICKYK~1\\AppData\\Local\\Temp\\pip-build-5v23nswh\\pyaudio\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\VICKYK~1\AppData\Local\Temp\pip-m53gsf79-record\install-record.txt --single-version-externally-managed --compile:



月关宝盒
浏览 462回答 2
2回答

小怪兽爱吃肉

不能安装 Pyaudio 的原因是你的 python 版本,支持 Pyaudio 的最后一个 python 版本是 python 3.6 所以你必须安装 python 3.6 或 3.5 或 3.4 或 python 2.7。安装 python 3.6 后,使用此链接并根据您的操作系统下载 pyaudio.whl。然后使用此命令安装它:pip&nbsp;install&nbsp;<package_name>.whl

慕工程0101907

要使用 conda 安装最新版本的 pyaudio:source activate -your environment name-pip install pyaudio如果遇到 PortAudio 开发包错误,请安装sudo apt-get install portaudio19-dev
随时随地看视频慕课网APP

相关分类

Python
我要回答