无法导入声音文件python

2024-05-15 10:45:00 发布

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

在wither python3或python上使用import soundfile时,我得到:

Traceback (most recent call last): File "", line 1, in File "/home/erezsh/.local/lib/python3.6/site-packages/soundfile.py", line 142, in raise OSError('sndfile library not found') OSError: sndfile library not found

我发现this post没有帮助,因为我使用的是soundfile,而不是pysoundfile,它提供的链接已断开。

另外,here我找不到解决方案,因为我已使用pip install SoundFile安装。

我在windows上使用Ubuntu shell。这有什么重要的吗?

我该怎么解决?


Tags: inimportmostlinelibrarynotpython3file
0条回答
网友
1楼 · 发布于 2024-05-15 10:45:00

您需要安装所需的库:

On Linux, you need to install libsndfile using your distribution’s package manager, for example sudo apt-get install libsndfile1.

From PyPI

相关问题 更多 >