You can install additional Python modules interactively, programmatically or manually (as you would install additional python modules in your machine even without DIAdem).
Interactively
1. Open DIAdem.
2. Navigate to
Settings>> DIAdem Settings>> Script.
3. Enter the Python module name in the corresponding textbox.
4. Click the
Install / Update Module button.
Programmatically
You can achieve the same result programmatically by creating a script that calls the Command Prompt and runs the pip install command. For a Python script, you would use the command subprocess.run(["pip", "install", "ModuleName"]). In case you also want to display the module installation output in 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):
Manually
- Launch the Windows Command Prompt as administrator.
- Navigate to the DIAdem installation of Python cd 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 moduleName
Additional Information
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 that is not 3.7 or 3.6, DIAdem takes the version which is installed together with DIAdem.