【发布时间】:2020-10-18 13:27:48
【问题描述】:
上下文:Windows 10 尝试按照说明安装和测试 python hid:
pip install hid
导入模块测试失败:
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import hid
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\student\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\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
发布的hidapi-win.zip 包括预编译:
hidapi.dll
hidapi.lib
问题:确定安装这两个文件的正确位置所需的思考过程和事实是什么?假设最近安装了 Windows 10 和 Python 3.8
【问题讨论】:
-
这个运气好吗?我也有同样的问题。
标签: python-3.x windows hid