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

No backend available (macOS m3) #151

Closed
Oliver0804 opened this issue Jul 22, 2024 · 3 comments
Closed

No backend available (macOS m3) #151

Oliver0804 opened this issue Jul 22, 2024 · 3 comments

Comments

@Oliver0804
Copy link

I use conda as my Python environment and use Python 3.11 version.
I installed libusb via brew install libusb.
However, I still get the following information:


Traceback (most recent call last):
  File "/Users/oliver/anaconda3/envs/luan/bin/cynthion", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/oliver/anaconda3/envs/luan/lib/python3.11/site-packages/cynthion/commands/cli.py", line 91, in main
    bitstream_info = get_bitstream_information()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/oliver/anaconda3/envs/luan/lib/python3.11/site-packages/cynthion/commands/util.py", line 30, in get_bitstream_information
    device = ApolloDebugger._find_device([
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/oliver/anaconda3/envs/luan/lib/python3.11/site-packages/apollo_fpga/__init__.py", line 172, in _find_device
    device = usb.core.find(backend=backend, idVendor=vid, idProduct=pid, custom_match=custom_match)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/oliver/anaconda3/envs/luan/lib/python3.11/site-packages/usb/core.py", line 1309, in find
    raise NoBackendError('No backend available')
usb.core.NoBackendError: No backend availabl

@depili
Copy link

depili commented Jul 22, 2024

Duplicate of #136. Non-homebrew pythons aren't patched to find the homebrew libraries.

@mossmann
Copy link
Member

@Oliver0804 Does brew install python or one of the other solutions mentioned in #136 work for you?

@Oliver0804
Copy link
Author

@Oliver0804 Does brew install python or one of the other solutions mentioned in #136 work for you?

I prefer not to use brew install python to set up the Python environment. In fact, I'm more accustomed to using conda for creating environments, given the numerous versions of Python and the significant dependency issues.

My solution is to use brew install libusb and then add the following to ~/.zshenv:

export DYLD_LIBRARY_PATH="/opt/homebrew/opt/libusb/lib:$DYLD_LIBRARY_PATH"

This approach temporarily resolves the issue.

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

3 participants