-
Notifications
You must be signed in to change notification settings - Fork 22
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
"No backend available" on macOS #136
Comments
Ran into this issue on Ubuntu 24.04 LTS. I was able to resolve this by running I confirmed libusb-1.0 package was already installed when the issue occurred. The immediate issue is resolved for me, but figured I'd document what worked for me in case someone else runs into this issue. 🙂 |
Thanks for everyone's efforts here. I've tried the |
if your pip isn't complaining and refusing to install anything due to being externally managed if run outside of a venv you aren't using the homebrew pip and python. |
Thanks - here's the full output:
|
cynthion info
and various other commands error out with:This happens because pyusb can't find the libusb (dynamically linked C) library. Part of the solution is to ensure that libusb is installed (see #132), but there can also be problems with pyusb finding the installed libusb. This is especially likely if libusb was installed with Homebrew and the user is using Apple's system Python.
One solution is to install Homebrew's Python which knows where to look for Homebrew's libraries:
Here are a couple other solutions that are reasonable to recommend if a user doesn't want to use Homebrew's Python for some reason: https://stackoverflow.com/questions/70729330/python-on-m1-mbp-trying-to-connect-to-usb-devices-nobackenderror-no-backend-a/70730920#70730920
This suggests that setting
DYLD_FALLBACK_LIBRARY_PATH
should be preferred overDYLD_LIBRARY_PATH
: https://github.com/orgs/Homebrew/discussions/3424#discussioncomment-3131452I think we should catch
NoBackendError
and provide the user with a more informative error message.We may also want to consider updating the documentation with a way to ensure that libusb can be found by pyusb. This could be as simple as doing
brew install python libusb
instead of justbrew install libusb
.We may even want to consider a workaround in software such as having
cynthion setup
configureDYLD_FALLBACK_LIBRARY_PATH
or #gasp# look for/opt/homebrew/lib
specifically: https://stackoverflow.com/questions/70261178/pyusb-no-backend-available-how-to-specify-custom-location-of-libusbThe text was updated successfully, but these errors were encountered: