【问题标题】:How to solve OS Error to import soundfile library如何解决操作系统错误以导入声音文件库
【发布时间】:2020-02-04 07:14:11
【问题描述】:

我正在努力纠正这个错误

from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
import soundfile as sf
Traceback (most recent call last):

  File "<ipython-input-5-ae75db7b0c22>", line 4, in <module>
    import soundfile as sf

  File "...\appdata\local\programs\python\python37\lib\site-packages\soundfile.py", line 163, in <module>
    _path, '_soundfile_data', _libname))

OSError: cannot load library 'c:\users\ishpreet\appdata\local\programs\python\python37\lib\site-packages\_soundfile_data\libsndfile64bit.dll': error 0x7e

【问题讨论】:

    标签: python python-3.x soundfile


    【解决方案1】:

    您的 soundfile 库似乎安装错误,Python 代码存在,但它只是缺少本机 dll 的包装器。

    库的社区和错误跟踪器通常是查找这些问题的更好地方,实际上it has an issue open indicating that pip 20 mis-installs soundfile (and others) 因为它抓取的是纯 python 包而不是带有预编译库的轮子。

    您可能想要:

    • 等一下
    • 明确安装合适的轮子
    • 降级到点子 19.3

    【讨论】:

    • “明确安装合适的轮子”是什么意思?
    • 为您的平台下载正确的(二进制)wheel 包,然后use pip to install that file specifically。如果没有选择,Pip 无法抓住错误的包。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-07-09
    • 1970-01-01
    • 1970-01-01
    • 2015-09-24
    • 2020-05-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多