...
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-11.2-x86_64-3.7
copying src/pyaudio.py -> build/lib.macosx-11.2-x86_64-3.7
running build_ext
building '_portaudio' extension
creating build/temp.macosx-11.2-x86_64-3.7
creating build/temp.macosx-11.2-x86_64-3.7/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -DMACOSX=1 -I/Users/yuanxingyou/.pyenv/versions/3.7.10/include/python3.7m -c src/_portaudiomodule.c -o build/temp.macosx-11.2-x86_64-3.7/src/_portaudiomodule.o
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
#**include "portaudio.h"**
^~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pyaudio
这是由于缺少portaudio导致的,使用如下命令安装portaudio
brew install portaudio
brew是Mac软件包管理器,没有的话
使用ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
来安装