python - 无法导入声音文件 (mac)
问题描述
尝试时出现错误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_data
和mdfind libsndfile.dylib
时,它没有给我任何结果。另外,当我这样做时brew install libsndfile
,它告诉我它是already installed and up-to-date
。
解决方案
推荐阅读
- c# - 查找 GPIB 总线上的设备列表
- c# - 如何修复 .AddServices() 错误 - 扩展)IServiceCollection IServiceCollection.AddServices(IConfiguration 配置
- python - 如何使用“with open”比较python中两个文件的不同之处
- flutter - 如何在 Flutter 中配置 Xmpp 库?
- javascript - 在 Javascript 中搜索数据表
- javascript - “x”类型的参数不能分配给 Angular7 中“x”类型的参数
- javascript - 在 JavaScript 中将类似 JSON 的文件类型解析为 JSON
- reactjs - 如何从无限重新渲染中停止反应组件
- ios - Thread 1: signal SIGABRT - when used with uibutton to open wkwebview
- angular - Efficient NoSQL data model for large collections