开发者社区> 问答> 正文

导入python声音文件库时出现问题-OSError:找不到库:“ sndfile”

我正在托管一个python flask服务,该服务使用soundfile库进行音频计算。它在本地运行良好,但是当我在redhat上托管它时,我看到以下问题。有什么建议么 -

from soundfile import read
  File "/apollo/env/AQTAudioPoProService/lib/python3.4/site-packages/soundfile.py", line 265, in <module>
    _snd = _ffi.dlopen('sndfile')
  File "/apollo/env/AQTAudioPoProService/lib/python3.4/site-packages/cffi/api.py", line 139, in dlopen
    lib, function_cache = _make_ffi_library(self, name, flags)
  File "/apollo/env/AQTAudioPoProService/lib/python3.4/site-packages/cffi/api.py", line 769, in _make_ffi_library
    backendlib = _load_backend_lib(backend, libname, flags)
  File "/apollo/env/AQTAudioPoProService/lib/python3.4/site-packages/cffi/api.py", line 757, in _load_backend_lib
    raise OSError("library not found: %r" % (name,))
OSError: library not found: 'sndfile'
尝试安装libsndfile

[dshanm@aqts-popro-1a-05885815] var/output/logs% sudo yum install libsndfile
Loaded plugins: priorities, security
Setting up Install Process
No package libsndfile available.
Error: Nothing to do

展开
收起
祖安文状元 2020-01-06 16:34:15 5372 0
1 条回答
写回答
取消 提交回答
  • 声音文件Python模块取决于本libsndfile机库。您需要在操作系统上安装它:

    $ yum install libsndfile
    
    2020-01-06 16:34:24
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载