When I run in 32 bit python,
import pyvisa
rm = pyvisa.ResourceManager()
I get this error:
Traceback (most recent call last): File "", line 1, in File "C:UserslatshawAppDataLocalProgramsPythonPython38-32libsite-packagespyvisahighlevel.py", line 3015, in new visa_library = open_visa_library(visa_library) File "C:UserslatshawAppDataLocalProgramsPythonPython38-32libsite-packagespyvisahighlevel.py", line 2929, in open_visa_library return cls(argument) File "C:UserslatshawAppDataLocalProgramsPythonPython38-32libsite-packagespyvisahighlevel.py", line 175, in new raise OSError("Could not open VISA library: " + " ".join(errs)) OSError: Could not open VISA library: function 'viOpen' not found
Here is what I have tried so far: re-installed with pip
$ pip install -U pyvisa
Here is some info of the install:
python -m visa info
C:UserslatshawAppDataLocalProgramsPythonPython38-32libsite-packagesvisa.py:13: FutureWarning: The visa module provided by PyVISA is being deprecated. You can replace import visa
by import pyvisa as visa
to achieve the same effect.
The reason for the deprecation is the possible conflict with the visa package provided by the https://github.com/visa-sdk/visa-python which can result in hard to debug situations.
warnings.warn
Machine Details: Platform ID: Windows-10-10.0.18362-SP0 Processor: Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
Python: Implementation: CPython Executable: C:UserslatshawAppDataLocalProgramsPythonPython38-32python.exe Version: 3.8.5 Compiler: MSC v.1926 32 bit (Intel) Bits: 32bit Build: Jul 20 2020 15:43:08 (#tags/v3.8.5:580fbb0) Unicode: UCS4
PyVISA Version: 1.11.3
Backends: ivi: Version: 1.11.3 (bundled with PyVISA) #1: C:windowssystem32visa32.dll: found by: auto bitness: 32 Could not get more info: function 'viOpen' not found
I am not sure what is going wrong here. From my research, it seems that the biggest 2 ways that people make mistakes are in mismatching a 32 version of pyvisa and a 64 bit version of IDLE (both of mine are 32 bit) and the other is in naming the file visa.py (which I am not doing).
Any help is greatly appreciated, cheers!