문제

I have both fluidsynth

sudo apt-get install fluidsynth

and pyfluidsynth

sudo pip install pyfluidsynth

installed.

However, when I run the standard import commands, I get the following error:

>>> import fluidsynth
>>> fs = fluidsynth.Synth()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Synth'
도움이 되었습니까?

해결책

For whatever reason, it appears as if following your installation directions made you download fluidsynth version 0.2, instead of version 1.2.4, which is the most recent one.

To install the correct package, uninstall fluidsynth and manually install the correct package (the tar.gz file from the pypi page for fluidsynth):

pip uninstall pyfluidsynth
pip install -Iv https://pypi.python.org/packages/source/p/pyFluidSynth/pyFluidSynth-1.2.4.tar.gz#md5=60079310701d0b9298b65a8b6728ffcc
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top