安装pyaudio

http://people.csail.mit.edu/hubert/pyaudio/

一、Windows

https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio

pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl

装错wheel会报错:

ERROR: PyAudio-0.2.11-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.

python shell中输入:

>>> import wheel.pep425tags as w
>>> print(w.get_supported())

[('cp37', 'cp37m', 'win_amd64'), ('cp37', 'none', 'win_amd64'), ('cp37', 'none', 'any'), ('cp3', 'none', 'any'), ('cp36', 'none', 'any'), ('cp35', 'none', 'any'), ('cp34', 'none', 'any'), ('cp33', 'none', 'any'), ('cp32', 'none', 'any'), ('cp31', 'none', 'any'), ('cp30', 'none', 'any'), ('py3', 'none', 'win_amd64'), ('py37', 'none', 'any'), ('py3', 'none', 'any'), ('py36', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]

二、Linux

sudo apt-get install python-pyaudio python3-pyaudio

posted on 2020-03-06 22:14  HolaWorld  阅读(2444)  评论(0编辑  收藏  举报

导航