我不明白这是怎么发生的。星期五我的代码运行良好!然后今天我不能再进口签证了。我卸载了 python x,y 并删除了 python27 文件夹,然后重新安装了 python x,y 并重新安装了 pyvisa 1.4(我以前使用过的版本),但仍然出现以下错误。
Traceback (most recent call last):
File "C:/Users/matthew/PycharmProjects/untitled8/Automated_test.py", line 4, in <module>
import visa
File "C:\Python27\lib\site-packages\visa.py", line 1, in <module>
from pyvisa.visa import *
File "C:\Python27\lib\site-packages\pyvisa\__init__.py", line 35, in <module>
import vpp43
File "C:\Python27\lib\site-packages\pyvisa\vpp43.py", line 49, in <module>
from vpp43_types import *
File "C:\Python27\lib\site-packages\pyvisa\vpp43_types.py", line 63, in <module>
ViUInt32, ViPUInt32, ViAUInt32 = _type_triplet(_ctypes.c_ulong)
AttributeError: 'module' object has no attribute 'c_ulong'