I create a little GUI interface to work with Keysight stuff.
I use Python 3.6.4, PyVisa 1.8 (both x64), setuptools 19.2
When i create exe-file by PyInstaller it's all builded whithout any errors.
And when a run application it's all good.
But when i run it into another machine (win7x64, without python, pyvisa, etc... stuff) it's doesn't work by OSError: Could not open VISA library
How can i packed up my application and pyvisa stuff into one piece?
""" Main body """
import sys, time, visa, interface
from PyQt5 import QtCore, QtWidgets, QtGui
RM = visa.ResourceManager("C:/Windows/System32/visa32.dll")
#RM = visa.ResourceManager()
KEYSIGHT = RM.open_resource('TCPIP0::10.11.0.200::inst0::INSTR')
...
PyVisa wraps the NI Visa library, but that library must be installed separately because it is an NI product. PyInstaller has no way of bundling this because Pyvisa does not bundle it.
That said, I expect that if you install NI Visa library on your target PC, your software will work. You'll need to advise users that NI Visa is a dependency they'll need to install themselves.