Installing Additional Python Modules to DIAdem 2020

Updated Nov 26, 2021



  • DIAdem

My automation algorithms use certain Python modules. How can I add them to the DIAdem Python script?

Firstly, you may need to check the compatibility of your python version and DIAdem/SystemLink. For example, DIAdem 2020SP1 supports Python 3.6 and 3.7 (64 bit). You can find the information on readme documents.

We have two scenarios:
a) DIAdem is using Python version pre-installed on the PC.
b) DIAdem is using its built-in Python on the PC.

For the first scenario:
  • Make sure that you have installed the PyWin32 module in your Python version (by using command pip install PyWin32 in command prompt). This is required for the connection to DIAdem.
  • Install your Python library.
  • Specify the Python installation path in the DIAdem configuration for SCRIPT (Menu >> Settings >> DIAdem Settings >> SCRIPT).
  • Ensure the Python's path has been added to the environment variable.
  • Import the library into DIAdem and use its contents.
For the second scenario:
  • Launch command window as administrator.
  • Navigate to the DIAdem installation of Python.
C:\Program Files\National Instruments\Shared\Skyline\Python
  • Navigate into the Python version folder, and then into the Scripts folder.
  • Perform any necessary install using pip install [module name]

Additional Information

Additional information about how DIAdem finds the Python version to work with:
  • First DIAdem takes the Python version which is entered in the DIAdem configuration for SCRIPT.
  • If this is empty (the default) DIAdem takes the Python version which is entered in the Windows path environment.
  • In all other cases and if DIAdem finds an installed version which is not 3.7 or 3.6, DIAdem takes the version which is installed together with DIAdem.