Skip to content

07. Managing Embedded Python Dependencies

Shuheng Liu (InterSystems) edited this page Sep 30, 2024 · 5 revisions

For Package Developers

To include python dependencies in an IPM package, a developer can list all dependencies in a requirements.txt file at the root level of the package (in the same directory of module.xml). The format of requirements.txt should follow PEP 508.

For Package Users

When installing an IPM package, IPM will automatically check for existence of requirements.txt at the package root and, if found, install all Python package found in it using pip.

Dynamic Python (IRIS 2024.2+)

In IRIS 2024.2 and later, certain platforms (such as Windows and Linux) support flexible python runtime, or, as we call it, bring-your-own-python (BYOP). Users can dynamically load a Python dynamic library (.dll, .so) of their own choosing, and make use of various syntax features and optimizations in different python versions.

If you are using this feature on Windows, the irispip.exe is no longer shipped with IRIS. This causes IPM 0.7.2 and earlier to be unable to install python dependencies. It is recommended that you upgrade to IPM 0.7.3 or higher, then manually specify the path to either 1) a python executable or 2) a pip executable.

  1. If you want to specify the path of a python executable, you need to run zpm "config set UseStandalonePip 0" and "zpm "config set </absolute/path/to/python/executable>".
  2. If you want to specify the path of a pip executable, you need to run zpm "config set UseStandalonePip 1" and "zpm "config set </absolute/path/to/pip/executable>".
  3. After doing either of the above, you can verify the configuration by running "zpm "config list".

Note

Starting from 0.7.3, IPM will automatically detect the version of your python runtime

Clone this wiki locally