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

导入librosa时触发numba.errors.TypingError问题求助

导入librosa时Numba报错:Windows 32位环境不支持parallel目标

在Windows系统的VSCode中仅执行import librosa语句时,出现如下错误:

Traceback (most recent call last):
  File "downloadlib.py", line 1, in <module>
    import librosa
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\librosa\__init__.py", line 209, in <module>
    from . import core
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\librosa\core\__init__.py", line 6, in <module>
    from .audio import *  # pylint: disable=wildcard-import
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\librosa\core\audio.py", line 12, in <module>
    import resampy
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\__init__.py", line 7, in <module>
    from .core import *
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\core.py", line 9, in <module>
    from .interpn import resample_f_s, resample_f_p
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\interpn.py", line 113, in <module>
    def resample_f_p(x, t_out, interp_win, interp_delta, num_table, scale, y):
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\npyufunc\decorators.py", line 179, in wrap
    guvec.add(fty)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\npyufunc\ufuncbuilder.py", line 214, in add
    cres, args, return_type = _compile_element_wise_function(
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\npyufunc\ufuncbuilder.py", line 146, in _compile_element_wise_function
    cres = nb_func.compile(sig, **targetoptions)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\npyufunc\ufuncbuilder.py", line 95, in compile
    return self._compile_core(sig, flags, locals)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\npyufunc\ufuncbuilder.py", line 127, in _compile_core
    cres = compiler.compile_extra(typingctx, targetctx,
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\compiler.py", line 551, in compile_extra
    return pipeline.compile_extra(func)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\compiler.py", line 331, in compile_extra
    return self._compile_bytecode()
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\compiler.py", line 393, in _compile_bytecode
    return self._compile_core()
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\compiler.py", line 373, in _compile_core
    raise e
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\compiler.py", line 364, in _compile_core
    pm.run(self.state)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\compiler_machinery.py", line 347, in run
    raise patched_exception
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\compiler_machinery.py", line 338, in run
    self._runPass(idx, pass_inst, state)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\compiler_machinery.py", line 302, in _runPass
    mutated |= check(pss.run_pass, internal_state)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\compiler_machinery.py", line 275, in check
    mangled = func(compiler_state)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\typed_passes.py", line 89, in run_pass
    typemap, return_type, calltypes = type_inference_stage(
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\typed_passes.py", line 67, in type_inference_stage
    infer.propagate(raise_errors=raise_errors)
  File "C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\numba\typeinfer.py", line 985, in propagate
    raise errors[0]


numba.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Internal error at <numba.typeinfer.CallConstraint object at 0x0F3A0C70>.
Failed in nopython mode pipeline (step: nopython mode backend)
The 'parallel' target is not currently supported on Windows operating systems when using Python 2.7, or on 32 bit hardware.


[1] During: lowering "id=1[LoopNest(index_variable = parfor_index.83, range = (0, $n_out.94, 1))]{168: <ir.Block at C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\interpn.py (52)>, 170: <ir.Block at C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\interpn.py (52)>, 238: <ir.Block at 
C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\interpn.py (61)>, 304: <ir.Block at C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\interpn.py (72)>, 306: <ir.Block at C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\interpn.py (72)>, 84: <ir.Block at C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\interpn.py (34)>, 380: <ir.Block 
at C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\interpn.py (77)>}Var(parfor_index.83, interpn.py:34)" at C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\interpn.py (34)
[2] During: resolving callee type: type(CPUDispatcher(<function _resample_loop at 0x0F0ACA00>))
[3] During: typing of call at C:\Users\Owner\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\interpn.py (114)

Enable logging at debug level for details.

File "....\AppData\Local\Programs\Python\Python38-32\lib\site-packages\resampy\interpn.py", line 114:
def resample_f_p(x, t_out, interp_win, interp_delta, num_table, scale, y):
    _resample_loop_p(x, t_out, interp_win, interp_delta, num_table, scale, y)

已尝试的解决操作:

  • 卸载Numba后导入librosa,系统会自动重新安装该依赖库
  • 更换过scipy、Numba、librosa的不同版本,但问题仍未解决

当前环境的pip包列表:

pip list
 Package            Version
- ------------------ ------------
- appdirs            1.4.4
- audioread          2.1.9
- certifi            2022.6.15
- cffi               1.15.1
- chardet            4.0.0
- click              8.1.3
- colorama           0.4.5
- cycler             0.11.0
- decorator          5.1.1
- filelock           3.7.1
- Flask              2.1.0
- Flask-Login        0.6.1
- Flask-SQLAlchemy   2.5.1
- fonttools          4.34.4
- greenlet           1.1.2
- huggingface-hub    0.8.1
- idna               2.10
- importlib-metadata 4.12.0
- itsdangerous       2.1.2
- Jinja2             3.1.2
- joblib             1.0.0
- kiwisolver         1.4.4
- librosa            0.9.2
- llvmlite           0.31.0
- MarkupSafe         2.1.1
- matplotlib         3.5.2
- noisereduce        2.0.1
- numba              0.48.0
- numpy              1.21.6
- packaging          21.3
- pandas             1.1.2
- Pillow             9.2.0
- pip                22.1.2
- pooch              1.6.0
- pycparser          2.21
- pyparsing          3.0.9
- python-dateutil    2.8.2
- pytz               2022.1
- PyYAML             6.0
- regex              2022.7.9
- requests           2.25.1
- resampy            0.3.1
- scikit-learn       0.23.2
- scipy              1.8.1
- setuptools         47.1.0
- six                1.16.0
- sounddevice        0.4.4
- SoundFile          0.10.3.post1
- SQLAlchemy         1.4.39
- threadpoolctl      3.1.0
- tokenizers         0.12.1
- torch              1.10.1
- tqdm               4.64.0
- transformers       4.19.2
- tweet-preprocessor 0.6.0
- typing_extensions  4.3.0
- urllib3            1.26.10
- Werkzeug           2.1.2
- zipp               3.8.0

有没有人遇到过类似问题?


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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.26 00:18:19