This page outlines the steps to install additional Python modules in NI DIAdem, both interactively or programmatically. The Python functionality was introduced in NI DIAdem in 2020 and is not available in previous versions. It requires NI DIAdem, Python, and the PyWin32 module to be installed.
NI DIAdem interacts with Python by looking up the Python version that is entered in the DIAdem configuration for SCRIPT. If this is empty (the default), DIAdem takes the Python version that is entered in the Windows path environment. In all other cases and if DIAdem finds an installed version that is not 3.7 or 3.6, DIAdem takes the version that is installed together with DIAdem.
The following table determines which version of Python is compatible with which NI DIAdem version.
For DIAdem versions up to 2022 Q4, DIAdem installs Python. As of DIAdem 2023 Q2, DIAdem no longer installs Python. If you want to use Python scripts in DIAdem, install a Python version supported by DIAdem, which can be found at https://www.python.org/ if you don't have it installed.
Beginning with 2025 Q2, DIAdem supports virtual environments created with venv.
NI has tested virtualenv versions 20.26.2, 20.29.1, and 20.29.3. While we expect newer versions to work, users must test DIAdem against new versions.
The three methods for installing additional python modules to NI DIAdem are, Interactively, Programmatically and Manually.
This method interacts with the built in functionality of NI DIAdem.
This method uses a script to achieve the same result by calling the Command Prompt and running the pip install command.
For a Python script, you would use the command:
subprocess.run(["pip", "install", "<ModuleName>"])
If it is necessary to display the module installation output in NI DIAdem, you can use the following example where the Panda module is being installed (besides the two lines of code, an import has been added at the top):
Test = subprocess.run([“pip”, “install”, “numpy”],stdout=subprocess.PIPE, text=True) Print(test.stdout)
This method uses the Command Prompt interactively, without opening NI DIAdem.
DIAdem Version | Python Version | |||||||
---|---|---|---|---|---|---|---|---|
3.13 | 3.12 | 3.11 | 3.10 | 3.9 | 3.8 | 3.7 | 3.6 | |
2025 Q2 | ||||||||
2024 Q4 | ||||||||
2024 Q2 | ||||||||
2023 Q4 | ||||||||
2023 Q2 | ||||||||
2022 Q4 | ||||||||
2022 Q2 | ||||||||
2021 SP1 | ||||||||
2021 | ||||||||
2020 SP1 | ||||||||
2020 |
supports Python
supports Python and virtual environments created with venv and some versions of virtualenv