03-30-2023 04:48 AM
Hello everyone,
I have developed a LabVIEW application and now I want to add to it the functionality of a separated python app developed by a teammate. I want to merge both apps in a unique exe file, but I can't find a proper way to do it.
I want it to be standalone to avoid having to install python files and libraries. As python uses 64-bit version, when I've been testing the integration with a local installation of 32-bit I've had to compile some of the libraries of python to 32-bits. I don't want to give this extra work to the end user.
The best solution I have achieved so far is using 2 exe files, one with the python functionality (all libraries and python runtime embedded) and the other with the LabVIEW program calling the python exe using System Exec.vi. This solution also avoids the bitness issue present when you use the native python node.
Is there a better solution?
Regards,
Iñigo.
08-07-2023 03:32 AM
Hello,This is a good idea.
I am also calling python programs recently and need additional libraries. But I'm having trouble installing this extra library.
Your idea gives me a lot of inspiration, I would like to ask you how to install the required python library offline?
Can you say more about exe with the python functionality?
Looking forward to your reply.
08-28-2023 01:16 AM
If you require extra libraries, install them on python. Then, when you compile the python program to exe, these extra libraries are included in the exe file.
Here you have the utility to create exe files:
PyInstaller Manual — PyInstaller 5.13.1 documentation
Cheers,
08-28-2023 04:30 AM
@IPach wrote:
If you require extra libraries, install them on python. Then, when you compile the python program to exe, these extra libraries are included in the exe file.
you can also copy the whole python folder in e.g. c:\program files after everything is setup in pip (run as admin).
C:\Windows\System32>where python
C:\Program Files\Python310\python.exe
C:\Windows\System32>pip --version
pip 23.1.2 from C:\Program Files\Python310\lib\site-packages\pip (python 3.10)