ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

python – Windows中的pyaudio安装错误

2019-07-06 16:56:45  阅读:499  来源: 互联网

标签:python windows python-2-7 command-prompt


我在我的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

请帮帮我.谢谢!

解决方法:

看看输出:

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吗?

标签:python,windows,python-2-7,command-prompt
来源: https://codeday.me/bug/20190706/1399139.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有