gpt4 book ai didi

python-3.x - 如何确定安装 hidapi.dll 的位置?

转载 作者:行者123 更新时间:2023-12-01 21:30:11 25 4
gpt4 key购买 nike

上下文: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.exe 所在的同一文件夹中。python exe 的位置可以在命令行中找到 where python

关于python-3.x - 如何确定安装 hidapi.dll 的位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62620247/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com