Import External Python Module for DIAdem Python Dataplugin

Updated Apr 1, 2024

Reported In

Software

  • DIAdem

Programming Language

  • Python

Issue Details

  • Can I use external Python modules such as NumPy and Pandas in my Python Dataplugin?
  • I am getting the following error whenever I import an external Python module. I am confident I have the module installed.
2021-10-19_14h17_16.png
Cannot load the file <file path> with the loader <dataplugin name>

More information:
"Module cannot be loaded from compiled python script"

Solution

This is expected behavior. The Python DataPlugin environment is not looking for any additional packages. A Python DataPlugin is only capable to use the built-in functionality of the installed python. This is done by design, to avoid situations where things are missing in a local python environment.

Additional Information

A Python DataPlugin exported and imported as URI should be usable on any machine having USI.