You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mac M1芯片Python3.10中PyAudio安装wheel构建失败求助

PyAudio安装失败问题(语音助手项目)

我在搭建语音助手项目时,已成功安装speechrecognization库,但安装PyAudio时遇到失败。

错误信息

安装过程中出现以下错误:

ERROR: Failed building wheel for PyAudio", Collecting PyAudio
  Using cached PyAudio-0.2.13.tar.gz (46 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: PyAudio
  Building wheel for PyAudio (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for PyAudio (pyproject.toml) did not run successfully.
  │ exit code: 1

同时还有:

Could not build wheels for PyAudio, which is required to install pyproject.toml-based projects

已尝试的解决方法

我已经试过以下方法:

  • 升级pip:
pip install --upgrade pip
  • 其他命令组合:
sudo apt install build-essential portaudio19-dev python3.10-dev
pip install pyaudio

brew install portaudio
brew link --overwrite portaudio
pip install pyaudio

python -m pip install PyAudio

pip install PyAudio --upgrade

系统环境

  • 操作系统:Mac M1芯片
  • Python版本:3.10.2

内容的提问来源于stack exchange,提问作者Grey Ace

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 00:16:09