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

Mac环境下安装Pyannote.audio失败求助:hmmlearn编译错误

解决Mac安装pyannote.audio时hmmlearn编译失败的问题

问题根源

报错是因为hmmlearn版本与当前pybind11版本不兼容:新版pybind11移除了py::gil_scoped_release的旧构造函数实现,但旧版hmmlearn仍在使用该调用方式,导致编译失败;标量初始化器括号警告属于次要问题,不影响核心功能,可忽略。

解决步骤

1. 安装兼容版本的pybind11

先锁定pybind11的兼容版本,避免与hmmlearn冲突:

python3 -m pip install pybind11==2.6.2

2. 手动安装指定版本的hmmlearn

跳过pip自动拉取的最新版hmmlearn,改用经过验证的兼容版本:

python3 -m pip install hmmlearn==0.2.8

3. 重新安装pyannote.audio

等hmmlearn安装完成后,执行原安装命令:

python3 -m pip install pyannote.audio

备选方案:使用conda安装(若有conda环境)

conda会自动处理依赖兼容性,可规避编译问题:

conda install -c conda-forge pyannote.audio

额外提示

  • 确保Python版本在3.8-3.10区间内,过高版本可能与pyannote.audio存在兼容问题
  • 标量初始化器括号警告无需处理,不影响工具正常运行

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.24 02:57:01