Version: 1.3.4
OS: Windows 11
Problem
When importing fluidsynth on Windows with Python 3.8:
It raises
FileNotFoundError: [WinError 3] The system cannot find the specified path: 'C:\\tools\\fluidsynth\\bin'
This is caused by the lines in fluidsynth.py:
# DLL search method changed in Python 3.8
# https://docs.python.org/3/library/os.html#os.add_dll_directory
if hasattr(os, 'add_dll_directory'): # Python 3.8+ on Windows only
os.add_dll_directory(os.getcwd())
os.add_dll_directory('C:\\tools\\fluidsynth\\bin')
# Workaround bug in find_library, it doesn't recognize add_dll_directory
os.environ['PATH'] += ';C:\\tools\\fluidsynth\\bin'
This will fail if C:\\tools\\fluidsynth\\bin does not exist on the user's machine.
Version: 1.3.4
OS: Windows 11
Problem
When importing
fluidsynthon Windows with Python 3.8:It raises
This is caused by the lines in
fluidsynth.py:This will fail if
C:\\tools\\fluidsynth\\bindoes not exist on the user's machine.