[英]Windows 7 x64 issue with PyVisa after making exe-file
I create a little GUI interface to work with Keysight stuff. 我创建了一个小的GUI界面来使用是德科技的东西。
I use Python 3.6.4, PyVisa 1.8 (both x64), setuptools 19.2 我使用的是Python 3.6.4,PyVisa 1.8(均为x64),setuptools 19.2
When i create exe-file by PyInstaller it's all builded whithout any errors. 当我通过PyInstaller创建exe文件时,所有文件均已构建,没有任何错误。
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 但是,当我将其运行到另一台机器上(win7x64,没有python,pyvisa等)时,OSError无法正常运行:无法打开VISA库
How can i packed up my application and pyvisa stuff into one piece? 我如何将我的应用程序和pyvisa东西打包在一起?
""" 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. PyVisa包装了NI Visa库,但是该库必须是单独安装的,因为它是NI产品。 PyInstaller has no way of bundling this because Pyvisa does not bundle it.
PyInstaller无法捆绑此文件,因为Pyvisa不会捆绑它。
That said, I expect that if you install NI Visa library on your target PC, your software will work. 就是说,我希望如果您在目标PC上安装了NI Visa库,您的软件将可以运行。 You'll need to advise users that NI Visa is a dependency they'll need to install themselves.
您需要告知用户NI Visa是他们自己安装所需的依赖项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.