Windows 上的 Pyusb - 没有可用的后端 [英] Pyusb on windows - no backend available

查看:19
本文介绍了Windows 上的 Pyusb - 没有可用的后端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 USB 将我的 Python 应用程序接口与 NFC 设备连接.最好的选择似乎是 PyUSB,但我无法让它连接到 libusb 后端.我不断得到

I'm trying to have my Python application interface with an NFC device via USB. The best option seems to be PyUSB, but I can't get it to connect to the libusb backend. I keep getting

ValueError:没有可用的后端

ValueError: No backend available

我查看了堆栈跟踪,发现 usb/backend/libusb10.py(它是 pyusb 的一部分)正在尝试加载 libusb-1.0.dll 用作后端,但它找不到它.不是不在我的路径上,而是根本不在我的电脑上!

I've looked at the stack trace, and found that usb/backend/libusb10.py (which is part of pyusb) is trying to load libusb-1.0.dll to use as the backend, but it can't find it. It's not that it's not in my path, it's not on my computer at all!

我已经安装了 libusb-win32,但生成的目录似乎只包含 libusb0.dll.libusb-1.0.dll 在哪里???!

I have installed libusb-win32, but the resulting directory only seems to include libusb0.dll. Where is libusb-1.0.dll???!

我很想知道从哪里获取该 dll,甚至想知道让 PyUSB 在 Windows 7 上运行的不同建议.

I would love to know either where to get that dll, or even a different suggestion to get PyUSB to work on Windows 7.

推荐答案

下载安装libusb-win32-devel-filter-1.2.6.0.exe.它应该可以工作.

Download and install libusb-win32-devel-filter-1.2.6.0.exe. It should work.

这篇关于Windows 上的 Pyusb - 没有可用的后端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆