拓冰建站拓冰建站
首页 / 资讯中心 / 正文

python usb 安装等问题

1. 安装 py 的 !pip install pyusb 但又找不到 usb.backend 即C的库 ?2. 下载dll没有 采用pip install libusb1 下载位置 https://github. com/ libusb/libusb/releases 空格去掉下载libusb-1.0.30.7z 不是下源代码解压VS2022 目录下MS64的 dll 一个文件libusb-1.0.dll因为 windows10 已经安装 C2015-2022 redistributable(x64)-14.44.35211 是64位的 libusb-1.0.dll 直接放在 C:\Windows\System32 重新启动python 环境可以认 usb 后端了3. 代码验证 找到几个usbimport usb.coreimport usb.backend.libusb1# 尝试获取后端backend usb.backend.libusb1.get_backend()if backend is not None:print(成功找到 libusb-1.0 后端)# 尝试查找设备devices usb.core.find(find_allTrue, backendbackend)print(f找到 {len(list(devices))} 个 USB 设备。)else:print(仍然无法找到后端请检查 DLL 文件是否放在了正确的位置。)4. 安装QT的 pip install PyQt6, pyqtgraph,pyqt6-tools 后面的是鼠标拖到用
分享:

看完干货,该让你的企业上线了

免费需求沟通 · 48 小时内出具建站方案 · 河南本地可上门