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

Upgrade soundfile to 0.11.0 to fix issue finding libsndfile.dylib #560

Conversation

douglascamata
Copy link
Contributor

@douglascamata douglascamata commented Nov 15, 2022

Lately the soundfile package hasn't been able to import the proper libsndfile.dylib in a M1 Macbook, even after installing it with brew install libsndfile:

❯ venv/bin/python -m autoeq --help
Traceback (most recent call last):
  File "/private/tmp/test/venv/lib/python3.10/site-packages/soundfile.py", line 142, in <module>
    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/doolivei/.asdf/installs/python/3.10.7/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/doolivei/.asdf/installs/python/3.10.7/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/private/tmp/test/venv/lib/python3.10/site-packages/autoeq/__main__.py", line 9, in <module>
    from autoeq.batch_processing import batch_processing
  File "/private/tmp/test/venv/lib/python3.10/site-packages/autoeq/batch_processing.py", line 6, in <module>
    import soundfile as sf
  File "/private/tmp/test/venv/lib/python3.10/site-packages/soundfile.py", line 162, in <module>
    _snd = _ffi.dlopen(_os.path.join(
OSError: cannot load library '/private/tmp/test/venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib': dlopen(/private/tmp/test/venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib, 0x0002): tried: '/private/tmp/test/venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file)

I found that the creator of Python's soundfile did a new release just recently to fix it: bastibe/python-soundfile#325. In this release, the correct libsndfile.dylib file is bundled together with the Python package.

This pull request upgrades the soundfile package dependency to the new 0.11.0 release.

I have tested this locally and it solves the problem.

@jaakkopasanen
Copy link
Owner

Forgot about this PR but ended up implementing the change myself. Thanks anyways!

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

Successfully merging this pull request may close these issues.

2 participants