PyVISA Setup in Windows
March 29, 2011 5 Comments
I’d imagine that the PyVISA setup usually goes much more smoothly in Linux than it does in Windows… Whatever, I jotted notes down on the process I went through in order to make it work. So, you benefit.
Download the following:
- python or python xy – I don’t know if python 3 works…
- ni-visa – Go to the download section and get the latest version.
- ni-488.2 – If you don’t already have your usb/pci gpib controller installed, grab the latest version.
- pyvisa – Get the tarball of the latest version.
- notepad++ – My fav text editor.
And now for the trickery:
- Install python, ni-visa, and notepad++
- If you already have the gpib controller installed, skip installing ni-488.2 (it’s more trouble than it’s worth to upgrade)
- Else install ni-488.2 and add you gpib controller through the ni-488.2 software as well as any windows hardware popup installers.
- If you grabbed python from python.org, you might need to add python to your system path by navigating to
start menu->control panel->system->advanced tab->environment variablesand adding
;C:\Python26to the PATH variable.
- If you grabbed python xy, you should be fine.
- Extract PyVISA to anywhere that is easy to navigate to in the cmd line, C:\PyVISA-1.3\ for example.
- Open up setup.cfg and setup.py in notepad++ and make the changes as listed in this bug report.
- Open up a command line by going to the start menu->run and passing it
- In the command line window, navigate to the PyVISA folder.
- Typing in the command
python setup.py installshould automatically install PyVISA to the C:\python\Lib\site-packages\ directory
If it doesn’t work, check setup.cfg, setup.py or the path variable to see that you did it correctly. If you have issues with the gpib controller, uninstall 488.2 completely (it comes with many parts) and reinstall 488.2 and re-add controller.