【问题标题】:pyaudio installtion error in windowswindows下pyaudio安装错误
【发布时间】:2015-11-16 13:35:28
【问题描述】:

我在我的 Windows 10 系统中使用 python 2.7。当我尝试使用命令从命令提示符安装 pyaudio 时

easy_install pyaudio

我收到以下错误消息:

Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\Ankit>easy_install pyaudio
Searching for pyaudio

Reading http://pypi.python.org/simple/pyaudio/
Best match: pyaudio 0.2.8

Downloading http://people.csail.mit.edu/hubert/pyaudio/packages/pyaudio-0.2.8.tar.gz#md5=

Processing pyaudio-0.2.8.tar.gz
Running PyAudio-0.2.8\setup.py -q bdist_egg --dist-dir

 c:\users\ankit\appdata\local\temp\easy_install-ejvxxc\PyAudio-0.2.8\egg-dist-tmp-42gjeh

warning: no files found matching '*.c' under directory 'test'

_portaudiomodule.c
src/_portaudiomodule.c(29) : fatal error C1083: Cannot open include file:

 'portaudio.h': No such file or directory

 error: Setup script exited with error: command '"C:\Program Files(x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2

我也试过

pip install pyaudio

这一次得到这个错误信息:

Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\Ankit>pip install pyaudio

You are using pip version 6.0.8, however version 7.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Collecting pyaudio

Could not find any downloads that satisfy the requirement pyaudio
Some externally hosted files were ignored as access to them may be unreliable

 (use --allow-external pyaudio to allow).

No distributions at all found for pyaudio

请帮帮我。在此先感谢!

【问题讨论】:

  • 首先以管理员身份运行 IDE 或 CMD 并运行以下命令:pip install pipwin / pipwin install pyaudio

标签: python windows python-2.7 command-prompt


【解决方案1】:

看输出:

Some externally hosted files were ignored as access to them may be unreliable    
(use --allow-external pyaudio to allow).

您可以安装它,为 pip 添加额外的参数:

pip install pyaudio --allow-external pyaudio --allow-unverified pyaudio

另外,你有PortAudio installed吗?

【讨论】:

  • 看来 OP 几乎没有从源代码构建 C 库的经验。在这种情况下,OP 安装预构建的包(例如 people.csail.mit.edu/hubert/pyaudio/packages/…)会更简单。
  • 我遇到了与 OP 类似的问题。我尝试了 user2386841 的解决方案,但它告诉我 no such option --allow-external 也许 pip 已经更新了,我必须尝试一些不同的东西。
  • 现在windows上有几个包管理工具。 “Vcpkg”和“winget”都包含了 Portaudo。 winget.run/pkg/intxcc/pyaudiovcpkg.info/port/portaudio
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-11-30
  • 1970-01-01
  • 2019-05-20
  • 1970-01-01
  • 2016-08-07
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多