PyVisa-py后端

PyVisa-py backend

我在树莓派2上安装pyvisa-py pn时出现错误,即

ImportError: cannot import name rname

在我 运行 命令

之后
rm = visa.ResourceManager('@py')

中断者给出的信息如下:

Traceback (most recent call last):
File "", line 1, in 
File "/usr/local/lib/python2.7/dist-packages/pyvisa/highlevel.py", line 1477, in new
visa_library = open_visa_library(visa_library)
File "/usr/local/lib/python2.7/dist-packages/pyvisa/highlevel.py", line 1446, in open_visa_library
cls = get_wrapper_class(wrapper)
File "/usr/local/lib/python2.7/dist-packages/pyvisa/highlevel.py", line 1426, in get_wrapper_class
pkg = import(pkgname)
File "/usr/local/lib/python2.7/dist-packages/pyvisa-py/init.py", line 26, in 
from .highlevel import PyVisaLibrary
File "/usr/local/lib/python2.7/dist-packages/pyvisa-py/highlevel.py", line 20, in 
from pyvisa import constants, errors, highlevel, rname
ImportError: cannot import name rname

此外,这是这里的内容 python -m 签证信息 returns :

Machine Details:
Platform ID: Linux-3.18.11-v7+-armv7l-with-debian-7.8
Processor: 
Python:
Implementation: CPython
Executable: /usr/bin/python
Version: 2.7.3
Compiler: GCC 4.6.3
Bits: 32bit
Build: Mar 18 2014 05:13:23 (#default)
Unicode: UCS4
PyVISA Version: 1.6.3
Backends:
ni:
Version: 1.6.3 (bundled with PyVISA)
Binary library: Not found
py:
Could not instantiate backend
-> cannot import name rname
sim:
Does not provide debug info

谁能帮我解决一下?非常感谢

https://github.com/hgrecco/pyvisa/issues/149 解释了如何解决这个问题。简而言之,您似乎有一个 pyvisa-py 需要更新(开发)版本的 pyvisa。