我一直在尝试为一个项目安装 PyAudio。我正在使用配备 M1 芯片、操作系统 11.0.1 的 Mac。
每次我运行时pip3 install pyaudio都会遇到同样的错误:
#include "portaudio.h"
^~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
我已经安装了 portaudiobrew install portaudio并拥有 x-code 命令行工具,但它仍然无法工作。我也尝试过将 sudo 放在它前面,但没有成功。
任何帮助表示赞赏!
这是错误的图像: 错误