python libusb winerror 126,python-3.x - device.is_kernel_driver_active()无法在libusb-1.0.22.7z中运行吗? - 堆...

在Windows 10上使用Python 3.7和libusb-1.0.22时,遇到'Operation not supported or unimplemented on this platform'错误。当尝试调用device.is_kernel_driver_active(interface)时,出现NotImplementedError。问题与libusb库的驱动支持有关。
摘要由CSDN通过智能技术生成

为什么我收到“此平台上不支持或未实现的操作”消息?

我正在运行Windows 10 64位并安装了python 3.7 64位,pyusb 1.0.2和libusb-1.0.22.7z。 对于libusb-1.0.22.7z,我将其解压缩并将MS64 \\ dll \\ libusb-1.0.dll复制到C:\\ Users .. \\ AppData \\ Local \\ Programs \\ Python \\ Python37 \\文件夹。

import usb

device = usb.core.find(idVendor = 0x0461, idProduct = 0x4d65) #mouse

if device is None:

raise ValueError('No device')

print(device)

interface = 0

if device.is_kernel_driver_active(interface):

print("kernel driver active")

The output is:

DEVICE ID 0461:4d65 on Bus 008 Address 002 =================

bLength : 0x12 (18 bytes)

bDescriptorType : 0x1 Device

bcdUSB : 0x200 USB 2.0

bDeviceClass : 0x0 Specified at interface

bDeviceSubClass : 0x0

bDevi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值