question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The Mac M1 series seems to be unsupported. Here is my debug output:

2021-01-21 16:49:22,365 ERROR:usb.libloader:Libusb 1 (/opt/homebrew/Cellar/libusb/1.0.24/lib/libusb-1.0.dylib) could not be loaded
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/usb/libloader.py", line 118, in load_library
    return ctypes.CDLL(lib)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/opt/homebrew/Cellar/libusb/1.0.24/lib/libusb-1.0.dylib, 6): no suitable image found.  Did find:
	/opt/homebrew/Cellar/libusb/1.0.24/lib/libusb-1.0.dylib: mach-o, but wrong architecture
	/opt/homebrew/Cellar/libusb/1.0.24/lib/libusb-1.0.0.dylib: mach-o, but wrong architecture
	/opt/homebrew/Cellar/libusb/1.0.24/lib/libusb-1.0.dylib: mach-o, but wrong architecture
	/opt/homebrew/Cellar/libusb/1.0.24/lib/libusb-1.0.0.dylib: mach-o, but wrong architecture
2021-01-21 16:49:22,367 ERROR:usb.backend.libusb1:Error loading libusb 1.0 backend
2021-01-21 16:49:22,367 ERROR:usb.libloader:'OpenUSB library' could not be found
2021-01-21 16:49:22,367 ERROR:usb.backend.openusb:Error loading OpenUSB backend
2021-01-21 16:49:22,369 ERROR:usb.libloader:'Libusb 0' could not be found
2021-01-21 16:49:22,369 ERROR:usb.backend.libusb0:Error loading libusb 0.1 backend
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/usb/core.py", line 1299, in find
    raise NoBackendError('No backend available')
usb.core.NoBackendError: No backend available

Please add this support.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:30 (17 by maintainers)

github_iconTop GitHub Comments

20reactions
mellow-hypecommented, Nov 21, 2021

For anyone else still having this issue, I manage python installations with pyenv and installed libusb with homebrew and was having this issue as well. I was finally able to resolve the issue by creating a new symlink in /usr/local/lib named libusb.dylib linked to the existing link created by homebrew.

ln -s /opt/homebrew/lib/libusb-1.0.0.dylib //usr/local/lib/libusb.dylib

It seems the expected file name is libusb.dylib.

5reactions
mellow-hypecommented, Jan 24, 2022

hey @jonasmalacofilho – in case it helps, I recently installed libusb via homebrew on a new M1 mac and ended up running into either the same or similar issue and resolving it by using export DYLD_LIBRARY_PATH=/opt/homebrew/lib prior to running the package that was leveraging libusb. I had forgotten about the fix I had previously noted above. Looking at both “fixes”, I think the issue may be in the custom directory homebrew uses on M1s (/opt/homebrew) and it not being in the default dyld search path (at least not for non-homebrew Python installations).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mac computers with Apple silicon
Mac computers with Apple silicon · MacBook Air (M2, 2022) · MacBook Pro (13-inch, M2, 2022) · Mac Studio (2022) · MacBook Pro...
Read more >
Is Apple Silicon ready?
Application M1 optimized Rosetta 2 M1 Supported version GIMP ✓ ✓ 2.10.32 Virtualbox ⚠️ 🚫 7.0.4 developer preview MongoDB Compass ✓ ✓
Read more >
Product Compatibility for Apple M1 Silicon Macs, Updated ...
ScopeBox 4.1 supports m1 Macs for all sources who have updated their driver support. This includes support for Blackmagic Design devices; UVC ...
Read more >
Everything you need to know about the M1 chip - Macworld
These new Macs come with macOS Monterey, which is version 12 of the Mac operating system. They do not work with previous versions...
Read more >
Apple M1 Processor Overview and Compatibility - Toptal
The M1 has a standard range of I/O options with a Thunderbolt controller capable of supporting USB 4. However, there's no support for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found