pyhidapi
pyhidapi copied to clipboard
Suddenly got error about missing libraries "Unable to load any of the following libraries"
It was working fine, but for some reason, I started getting this 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
It happens on in line with import hid.
Tried to uninstall/install hid package. The same.
Why?
OS: Windows 11 CLI: Git bash Python: 3.9.9 (venv)
Had the same, don't know how to fix it but found a workaround: load the hidapi DLL before importing the hid library.
import os, ctypes
ctypes.CDLL('/path/to/hidapi.dll'))```