为什么我收到“此平台上不支持或未实现的操作”消息?
我正在运行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