-
Notifications
You must be signed in to change notification settings - Fork 111
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
Find libsndfile.dylib on Apple M1 #311
Conversation
Thank you very much! I think it might be a good idea to fall back to the original path if |
Homebrew on Apple M1 uses a `/opt/homebrew/lib` instead of `/usr/local/lib`. We are making sure we pick that up.
I updated the PR, it checks if |
Sorry for being nitpicky, but I think it would be better to try the |
No, you're not being nitpicky, I always opt for try/catch. In fact, that is how i started the implementation. Problem is, if we try/catch and the catch clause fails (because there might not be a That's the reason I did it with a ternary. But I can do it with try/catch if you prefer it. |
There could be a try/catch within a try/catch, but not sure to catch in the inner one 😅 |
That's a valid concern. Perhaps we could try to find the correct location with I'll leave the decision up to you. Since this is a very niche workaround that probably doesn't affect too many people, either way is fine. |
I suspect this is affecting a fair number of people on M1s who are trying to do local development using libraries that depend on python-soundfile (e.g., torchaudio users). The tips in #310 worked for me. In my specific case, this worked out to be: bash -c "ln -s /opt/homebrew/lib/libsndfile.* /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/_soundfile_data/"
|
If anyone with access to an M1 machine would like to finish and test this pull request, I'll be happy to merge it. But I can't code it myself, because I don't have an M1. |
I did run the tests on a MacBook Air M1. All tests passed. Thanks @panosl!
|
Brilliant! Thank you all! |
Homebrew on Apple M1 uses a
/opt/homebrew/lib
instead of/usr/local/lib
.We are making sure we pick that up.