Automate Python Installation for LabVIEW Applications

Updated Aug 3, 2023

Environment

Software

  • LabVIEW 2018

Programming Language

  • Python

  • How do I automate a Python installation with my LabVIEW application? 
  • How do I deploy my LabVIEW application that uses Python Node without the need of installing Python seperately?

Python can be installed together with a LabVIEW application by deploying the LabVIEW application as an installer. The Python installer's executable can be run within the LabVIEW installer after execution. Kindly refer to the instruction below to understand how to distribute both the LabVIEW application and Python 3.6 to a deployment machine.
  1. Create a LabVIEW project and have your VI in it. Build the VI as an EXE. vi exe
  2. Create a Virtual Folder and add the Python installer into it. python installer
  3. Right-click Build Specifications and select New>>Installerbuild
  4. Fill up Product Information category accordingly. (Optional) Product Information
  5. Fill up Destinations category accordingly. (Optional) destination
  6. Add your VI, EXE and Python installer into the Source Files. source file
  7. Navigate to the Advances category and select Run executable at the end of the installationtick
  8. Select the Python installer that you wish to start its installation automatically and select OKselect python installer
  9. Select Buildbuild
  10. Once the installer is ready, right-click the installer and select ExploreExplore
  11. Copy the folder shown and paste it to the machine you wish to deploy the LabVIEW application.
  12. On the deployment machine, open the folder, launch the install.exe and begin the installation. install
  13. Once the LabVIEW application installation is done, Python installation will begin automatically. Do remember to select add Python 3.6 to PATH.python installation
  14. Once Python installation complete, your LabVIEW application with Python node is ready to be used on the deployment machine.

Additional Information
Support for Python sessions was added in LabVIEW 2018. If you do not have LabVIEW 2018, Perl and Python Scripts can be called from LabVIEW using the System Exec VI.