Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: sndfile library not found #27

Open
kshoemoney opened this issue May 26, 2022 · 1 comment
Open

OSError: sndfile library not found #27

kshoemoney opened this issue May 26, 2022 · 1 comment

Comments

@kshoemoney
Copy link

kshoemoney commented May 26, 2022

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
Copy link

hubortje commented Nov 12, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants