无法导入声音文件(mac)

2024-05-19 01:36:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我在尝试import soundfile时出错

我试图通过pip重新安装声音文件,但没有成功

这是我得到的错误

Traceback (most recent call last):
  File "/Users/kona/.pyenv/versions/3.9.5/lib/python3.9/site-packages/soundfile.py", line 142, in <module>
    raise OSError('sndfile library not found')
OSError: sndfile library not found

During handling of the above exception, another exception occured:

    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/Users/kona/.pyenv/versions/3.9.5/lib/python3.9/site-packages/soundfile.py", line 162, in <module>
        _snd = _ffi.dlopen(_os.path.join(
    OSError: cannot load library '/Users/kona/.pyenv/versions/3.9.5/lib/python3.9/site-packages/_soundfile_data/libsndfile.dylib': dlopen(/Users/kona/.pyenv/versions/3.9.5/lib/python3.9/site-packages/_soundfile_data/libsndfile.dylib, 2): image not found

当我做mdfind _soundfile_datamdfind libsndfile.dylib时,它没有给我结果。 而且,当我做brew install libsndfile时,它告诉我它是already installed and up-to-date


Tags: inpyenvlibpackageslinelibrarysiteversions

热门问题