Jump to content

Feature Guide: LabVIEW Virtual Environments ("lv-venv" folders)

Jim Kring

Recommended Posts

One of the key new features in Dragon and VIPM 2021 is support for installing packages underneath the project source folder. This is achieved using a LabVIEW Virtual Environment which is kept in an "lv-venv" subfolder of your project.

Note: This feature is kept mostly behind the scenes in Dragon, and users generally do not have to worry about how they work. Here are the most important things you need to know about LabVIEW Virtual Environments, along with some details you may find helpful:

About the "lv-venv" (LabVIEW Virtual Environment) Folder

A Dragon project will have the contents of packages installed, by default, into a virtual environment folder named "lv-venv", located next to the dragon project (*.dragon) file. This folder contains VIs (and other LabVIEW files), a VIPM package installation database, and other important files.


Warning - Do Not Modify: It is recommended to NOT modify any files in the virtual environment folder, in the same way you would take care not to modify any files installed beneath LabVIEW. However, deleting an lv-venv folder is generally not a problem, assuming you have saved your .dragon and .vipc file(s), which contain your project's configuration and can be used by Dragon to recreate the virtual environment.

Installing Packages Into the Virtual Environment (vs Global Environment)

The Resources page shows both the Global Environment and the Virtual Environment.


Installing a Package

To install packages in the Virtual Environment right-click on the "Virtual Environment (lv-venv)" or "LabVIEW YYYY" (Global Environment) node and select "Install Package" -- this will install the package into that environment (virtual or global, depending on which node you selected).


Note: If you right-click on the Resources tab/button and choose "Install a Package" or click on the Search Button, any install actions will target the virtual environment (for projects with a virtual environment). 


Uninstalling a Package

To uninstall a package, simply right-click on any package and choose "Uninstall Package" and it will be uninstalled from whichever environment it's currently installed.


Finding Installed VIs in the Palettes and QuickDrop
VIs for packages installed into a virtual environment will appear in a palette with the name "PROJECT_NAME (lv-venv)" as shown below. They will also be available in QuickDrop.


Note: If you're using a virtual environment, be sure you have the "VIPM Extensions for LabVIEW" package installed in the Global Environment for the LabVIEW version you're working in. Dragon will install this package automatically (after prompting you to confirm the action), if it's not already installed and you're using a virtual environment.


Using Virtual Environments with Source Code Control (e.g. Git)

You should generally not keep the LabVIEW Virtual Environment ("lv-venv") folder in source code control -- it will be created separately on each developer's machine. However, do keep any *.dragon and *.vipc files in source code control, since they contain the information used by Dragon to create and maintain the LabVIEW Virtual Environment. Please read Integrating Dragon with Source Code Control (e.g. Git or SVN) for details.



Turning Virtual Environments OFF (or ON) for a Project

You can turn Virtual Environments OFF on a per-project basis, in the Dragon project's Configuration page. Simply uncheck the "Install Packages Under Dragon Project Folder" checkbox (and then press the "Save" button).


Note that if you toggle this setting to OFF (where you previous had it turned ON), you may need to manually delete the virtual environment ("lv-venv") folder and make sure that your project's VIs are relinked to the installed package VIs in the global environment. Similarly, if you had this setting OFF and you turn it ON, you may need to manually uninstall packages from the global environment, install packages into the virtual environment, and then relink/resave your project VIs that link to those package VIs. There is a right-click option on the Project tab/button to Mass Compile the project folder, if you wish to use it.

Virtual Environments and VIPM Main UI (Only an FYI)

In order to install/uninstall packages in a virtual environment, Dragon activates the virtual environment in VIPM.

Note: Dragon does this behind the scenes when you're installing/uninstalling packages from the Resources page of the Dragon project window. IN GENERAL, YOU DO NOT NEED TO OPEN VIPM TO USE DRAGON. This information is only provided so that if you should have VIPM open, you will understand what you're seeing.  If you DO happen to open VIPM's Main UI, you can tell if a virtual environment is active, because a Dragon project name will be visible in the location where the LabVIEW Version selector is typically located (as shown below). You can Deactivate the virtual environment in VIPM by pressing the close "(X)" button on the Dragon project name indicator in VIPM.






  • Like 1
Link to comment
Share on other sites

  • Jim Kring changed the title to Feature Guide: LabVIEW Virtual Environments ("lv-venv" folders)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.