Skip to content

Library lookup doesn't work with custom path #50

@cdlm

Description

@cdlm

I have hidapi installed via brew under a custom prefix:

$ ls -l /opt/brew/lib/libhidapi*
lrwxr-xr-x 1 damien admin 45 Jun 13 19:25 /opt/brew/lib/libhidapi.0.dylib -> ../Cellar/hidapi/0.10.1/lib/libhidapi.0.dylib
lrwxr-xr-x 1 damien admin 39 Jun 13 19:25 /opt/brew/lib/libhidapi.a -> ../Cellar/hidapi/0.10.1/lib/libhidapi.a
lrwxr-xr-x 1 damien admin 43 Jun 13 19:25 /opt/brew/lib/libhidapi.dylib -> ../Cellar/hidapi/0.10.1/lib/libhidapi.dylib

That breaks qmk because it can't find it.

$ qmk compile
Error: %s: %s ('ImportError', ImportError('Unable to load any of the following libraries:libhidapi-hidraw.so libhidapi-hidraw.so.0 libhidapi-libusb.so libhidapi-libusb.so.0 libhidapi-iohidmanager.so libhidapi-iohidmanager.so.0 libhidapi.dylib hidapi.dll libhidapi-0.dll'))
Traceback (most recent call last):
  File "/opt/brew/Cellar/qmk/0.1.0/libexec/lib/python3.9/site-packages/qmk_cli/script_qmk.py", line 76, in main
    import qmk.cli  # noqa
  File "/Users/damien/Repositories/custom-keyboards/qmk_firmware/lib/python/qmk/cli/__init__.py", line 191, in <module>
    __import__(subcommand)
  File "/Users/damien/Repositories/custom-keyboards/qmk_firmware/lib/python/qmk/cli/console.py", line 9, in <module>
    import hid
  File "/opt/brew/Cellar/qmk/0.1.0/libexec/lib/python3.9/site-packages/hid/__init__.py", line 30, in <module>
    raise ImportError(error)
ImportError: Unable to load any of the following libraries:libhidapi-hidraw.so libhidapi-hidraw.so.0 libhidapi-libusb.so libhidapi-libusb.so.0 libhidapi-iohidmanager.so libhidapi-iohidmanager.so.0 libhidapi.dylib hidapi.dll libhidapi-0.dll

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions