我正在使用 64 位的 Windows 10。我想在我的 jupyter 笔记本中使用 python 的 mingus 包。但是我在运行流体合成库时遇到了问题。
我按照这个网站上的说明安装了流体合成器: https ://bspaans.github.io/python-mingus/doc/wiki/tutorialSetup.html
如果我尝试使用以下方法导入流体合成器:
from mingus.midi import fluidsynth
我得到错误:
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-2-6003c50a6278> in <module>
----> 1 from mingus.midi import fluidsynth
~\Anaconda3\envs\nlp\lib\site-packages\mingus\midi\fluidsynth.py in <module>
35 import wave
36
---> 37 from mingus.midi import pyfluidsynth as fs
38 from mingus.midi.sequencer import Sequencer
39
~\Anaconda3\envs\nlp\lib\site-packages\mingus\midi\pyfluidsynth.py in <module>
41 raise ImportError("Couldn't find the FluidSynth library.")
42
---> 43 _fl = CDLL(lib)
44
45
~\Anaconda3\envs\nlp\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
346
347 if handle is None:
--> 348 self._handle = _dlopen(self._name, mode)
349 else:
350 self._handle = handle
OSError: [WinError 193] %1 is not a valid Win32 application
我不知道问题是什么。我已经阅读了一些有关此错误的 stackoverflow 问题,但我不明白如何解决我的问题。
我不确定这里是否使用了我从 QSynth 获得的流体合成器。
有人有想法吗?我不是一个非常有经验的程序员,所以它也可能是一个简单的小错误。
我很高兴每个可以帮助我的人!