python - ImportError("找不到 FluidSynth 库。")
问题描述
我已经安装了流体合成器 2.0.5 版并在 mingus 中使用它。但是,当我运行代码时
from mingus.midi import fluidsynth
它返回这个
Traceback (most recent call last):
File "/Users/rudiherrig 1 2/Desktop/pythonstuff/musicExp.py", line 1, in <module>
from mingus.midi import fluidsynth
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mingus/midi/fluidsynth.py", line 37, in <module>
from mingus.midi import pyfluidsynth as fs
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mingus/midi/pyfluidsynth.py", line 41, in <module>
raise ImportError("Couldn't find the FluidSynth library.")
ImportError: Couldn't find the FluidSynth library.
我发现这很混乱,因为我安装了流体合成器。有想法该怎么解决这个吗?编辑:我在我的库中找到了一个名为 fluidsynth_dll.dsp 的文件,所以我不知道它为什么会返回这个错误。
解决方案
你需要安装libfluidsynth.dll
- 从以下网址下载预编译的 DLL:https ://zdoom.org/downloads#Support
- 如果您使用 64x 版本将文件重命名
libfluidsynth64.dll
为libfluidsynth.dll
- 将其放入
C:\Windows\System32
您也可以使用 GitHub 项目自行编译
推荐阅读
- marklogic - XPath 的 MarkLogic 查询
- javascript - 如果输入值为“某物”,则将 onclick 添加到按钮
- .htaccess - 如何使用 .htaccess 重定向?
- javascript - Javascript:哪个 Dom 事件可以绑定到 Input type=date 元素?
- powershell - PowerShell NotifyIcon 上下文菜单
- pandas - 从 Pandas 列中提取前 3 位数字
- c# - 使用 C# 打开旧的 VB6 随机访问文件
- typescript - 如何在 TypeScript 中尝试 catch 和 finally 语句?
- angular - 如何使用角度中的promise根据父值结合父子值?
- javascript - Selenium 服务器已启动并正在运行,但无法连接到 selenium