-
Notifications
You must be signed in to change notification settings - Fork 21
07. Managing Embedded Python Dependencies
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.
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
.
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.
- 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>"
. - 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>"
. - After doing either of the above, you can verify the configuration by running
"zpm "config list"
.
Starting from 0.7.3, IPM will automatically detect the version of your python runtime