PyVISA is a frontend to the VISA library. It runs on Python 2.6+ and 3.2+.
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 only against National Instruments’s VISA.
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
Testing your installation¶
That’s all! You can check that PyVISA is correctly installed by starting up python, and creating a ResourceManager:
>>> import visa >>> rm = visa.ResourceManager() >>> print(rm.list_resources())
If you encounter any problem, take a look at the Frequently asked 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 https://github.com/hgrecco/pyvisa/zipball/master
If you have an old system installation of Python and you don’t want to mess with it, you can try Anaconda CE. It is a free Python distribution by Continuum Analytics that includes many scientific packages.