msieg / deep-music-visualizer

The Deep Visualizer uses BigGAN (Brock et al., 2018) to visualize music.
389 stars 104 forks source link

OSError: sndfile library not found #27

Open kshoemoney opened 2 years ago

kshoemoney commented 2 years ago

I got this message when I tried to run the visualizer. Anyone know what I should do? I am on a mac running macOS Monterey

`Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/soundfile.py", line 142, in raise OSError('sndfile library not found') OSError: sndfile library not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/kjzoosh/deep-music-visualizer/visualize.py", line 1, in import librosa File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/librosa/init.py", line 209, in from . import core File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/librosa/core/init.py", line 6, in from .audio import * # pylint: disable=wildcard-import File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/librosa/core/audio.py", line 8, in import soundfile as sf File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/soundfile.py", line 162, in _snd = _ffi.dlopen(_os.path.join( OSError: cannot load library '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib': dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib, 0x0002): tried: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file)`

hubortje commented 1 year ago

Hey @kshoemoney,

you're missing the librosa module in your Python environment. Be sure to install it via pip prior to running the script.

Edit: Even better to run pip install -r requirements.txt prior to running the script. It will install all required modules.