PyVISA is a frontend to the VISA library. It runs on Python 3.6+.
You can install it using pip:
$ pip install -U pyvisa
In order for PyVISA to work, you need to have a suitable backend. PyVISA includes a backend that wraps the National Instruments’s VISA library. However, you need to download and install the library yourself (See NI-VISA Installation). There are multiple VISA implementations from different vendors. PyVISA is tested against National Instruments’s VISA and Keysight IO Library Suite which can both be downloaded for free (you do not need a development environment only the driver library).
PyVISA works with 32- and 64- bit Python and can deal with 32- and 64-bit VISA libraries without any extra configuration. What PyVISA cannot do is open a 32-bit VISA library while running in 64-bit Python (or the other way around).
You need to make sure that the Python and VISA library have the same bitness
$ pip install -U pyvisa-py
At the moment, PyVISA-Py implements only a limited subset of the VISA standard and does not support all protocols on all bus systems. Please refer to its documentation for more details.
Testing your installation
That’s all! You can check that PyVISA is correctly installed by starting up python, and creating a ResourceManager:
>>> import pyvisa >>> rm = pyvisa.ResourceManager() >>> print(rm.list_resources())
If you encounter any problem, take a look at the Miscellaneous questions. There you will find the solutions to common problem as well as useful debugging techniques. If everything fails, feel free to open an issue in our issue tracker
Using the development version
You can install the latest development version (at your own risk) directly form GitHub:
$ pip install -U git+https://github.com/pyvisa/pyvisa.git
If you have an old system installation of Python and you don’t want to mess with it, you can try Anaconda. It is a free Python distribution by Continuum Analytics that includes many scientific packages.