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

导入librosa后resampy报错:guvectorize()缺少必填参数'signature'

解决resampy导入时的guvectorize参数错误

错误详情

C:\Users\asus\AppData\Roaming\Python\Python37\site-packages\resampy\interpn.py in <module>
     73 @guvectorize(
     74     "(n),(m),(p),(p),(),()->(m)",
---> 75     nopython=True,
     76 )
     77 def resample_f_p(x, t_out, interp_win, interp_delta, num_table, scale, y):

TypeError: guvectorize() missing 1 required positional argument: 'signature'

问题原因

该错误源于numba与resampy版本不兼容:新版numba调整了guvectorize装饰器的参数规则,而你安装的resampy版本仍沿用旧参数写法,导致触发参数缺失报错。

解决方案

  • 降级numba到兼容版本:
    执行以下命令安装适配旧版resampy的numba版本:
    pip install numba==0.56.4
  • 升级resampy适配新版numba:
    执行命令更新resampy到支持当前numba的版本:
    pip install --upgrade resampy
  • 重新安装librosa(推荐):
    直接通过librosa官方安装命令自动匹配所有兼容依赖,避免手动安装的版本冲突:
    pip install librosa

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.17 23:10:59