pyusb - 将 PyVISA 与 PyVISA-Py 后端一起使用时出现问题:PyUSB 似乎没有正确安装
问题描述
我通过 pip安装PyVISA
、、、PyVISA-Py
和打包PyUSB
。libusb
但它仍然说pyUSB
没有正确安装。并且资源管理器无法列出桌面上的任何 USB 设备。我还在桌面上安装了NI-VISA,它也无法列出 USB 设备。
In [1]: import pyvisa
In [2]: rm = pyvisa.ResourceManager()
In [3]: rm.list_resources()
Out[3]: ('ASRL1::INSTR', 'ASRL3::INSTR')
In [4]: rm = pyvisa.ResourceManager('@py')
In [5]: rm.list_resources()
Out[5]: ()
命令窗口中的信息:
(base) C:\Users\zhang>pyvisa-info
Machine Details:
Platform ID: Windows-10-10.0.19041-SP0
Processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
Python:
Implementation: CPython
Executable: c:\users\zhang\anaconda3\python.exe
Version: 3.8.3
Compiler: MSC v.1916 64 bit (AMD64)
Bits: 64bit
Build: Jul 2 2020 17:30:36 (#default)
Unicode: UCS4
PyVISA Version: 1.11.3
Backends:
ivi:
Version: 1.11.3 (bundled with PyVISA)
#1: C:\WINDOWS\system32\visa32.dll:
found by: auto
bitness: 64
Vendor: National Instruments
Impl. Version: National Instruments
Spec. Version: National Instruments
#2: C:\WINDOWS\system32\visa64.dll:
found by: auto
bitness: 64
Vendor: National Instruments
Impl. Version: National Instruments
Spec. Version: National Instruments
py:
Version: 0.5.1
ASRL INSTR:
Please install PySerial (>=3.0) to use this resource type.
No module named 'serial'
USB INSTR:
PyUSB does not seem to be properly installed.
Please refer to PyUSB documentation and
install a suitable backend like
libusb 0.1, libusb 1.0, libusbx,
libusb-win32 or OpenUSB.
No backend available
USB RAW:
PyUSB does not seem to be properly installed.
Please refer to PyUSB documentation and
install a suitable backend like
libusb 0.1, libusb 1.0, libusbx,
libusb-win32 or OpenUSB.
No backend available
TCPIP INSTR: Available
TCPIP SOCKET: Available
GPIB INSTR:
Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of funcionality.
No module named 'gpib'
解决方案
推荐阅读
- c - Lex:同时匹配多个正则表达式
- typescript - TypeScript 联合类型缺少属性
- python - 雅虎使用 Selenium 登录,缺少点击
- python - Raspberry Pi 3 上模块 libscrc 的 ImportError
- javascript - 如何利用 DOM Create Element 使现有代码更加动态和简洁?
- spring-boot - Kubernetes pods 使用 TCP 连接优雅关闭(Spring boot)
- json - 将列表投射到飞镖中的对象列表中
- sql-server - 带有 SELECT 内部条件的 VIEWS 延迟查询
- apache-kafka - 如何在 Kafka Streams 中实现多个分区的总计数
- python - 晚上空闲时,我的 Flask 应用程序收到奇怪的请求