值错误:无后端

发布于 2024-12-19 19:16:38 字数 459 浏览 5 评论 0原文

尝试在带有 python 2.7 和 libusb 1.2.5 的 Windows 7 上使用 pyusb 1.0

安装一切正常,libusb 正在工作,因为我从测试程序获取端点信息,但是当我从 pyusb 教程运行此代码时 -

import usb.core
import usb.util
import sys

dev = usb.core.find(idVendor=0x20A4, idProduct=0x001)

if dev is None:
    raise ValueError('Device not found')

dev.set_configuration()

print "WINNING"

我得到一个 < code>Value Error: No Backend available error in line 846 of core.py

有什么建议吗?

trying to use pyusb 1.0 on windows 7 with python 2.7 and libusb 1.2.5

Have installed everything fine, libusb is working as I am getting endpoint information from the test program but when I run this code from the pyusb tutorial -

import usb.core
import usb.util
import sys

dev = usb.core.find(idVendor=0x20A4, idProduct=0x001)

if dev is None:
    raise ValueError('Device not found')

dev.set_configuration()

print "WINNING"

I am getting a Value Error: No Backend available error in line 846 of core.py

Any advice?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

居里长安 2024-12-26 19:16:38

最新的 pyusb trunk 支持 libusb 0.x 和 libusb 1.0。貌似不支持1.2,可以在usb/backend/libusb10.py中的get_backend()方法中看到。

也许你可以使用旧版本的 libusb,或者为 1.0 后端做出贡献:)

The latest pyusb trunk is supporting libusb 0.x and libusb 1.0. Look like it's not supporting 1.2, and you can see it in the usb/backend/libusb10.py in the get_backend() method.

Maybe you can use an older version of libusb, or contribute to the 1.0 backend :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文