python_dependencies#

python_dependencies()[source]#

Python package dependency requirement specifiers for the object (PEP 440).

Part of packaging metadata for the object.

  • String name: "python_dependencies"

  • Private tag, developer and framework facing

  • Values: str or list of str, each str a PEP 440 compliant dependency specifier

  • Example: "numpy>=1.20.0"

  • Example 2: ["numpy>=1.20.0", "pandas>=1.3.0"]

  • Default: no requirements beyond sktime core dependencies (None)

sktime manages objects and estimators like mini-packages, with their own dependencies and compatibility requirements. Dependencies are specified in the tags:

  • "python_version": Python version specifier (PEP 440) for the object,

  • "python_dependencies": list of required Python packages (PEP 440)

  • "python_dependencies_alias": alias for package names, if different from import names

  • "env_marker": environment marker for the object (PEP 508)

  • "requires_cython": whether the object requires a C compiler present

The python_dependencies tag of an object is string or list of strings, each string a PEP 440 compliant version specifier, specifying python dependency requirements of the object.

The tag is used in packaging metadata for the object, and is used internally to check compatibility of the object with the build environment, to raise informative error messages.

Developers should note that package names in PEP 440 specifier strings are identical with the package names used in pip install commands, which in general is not the same as the import name of the package, e.g., "scikit-learn" and not "sklearn".

Developers can use _check_soft_dependencies from skbase.utils.dependencies to check compatibility of the python constraint of the object with the current build environment, or _check_estimator_deps to check compatibility of the object (including further checks) with the current build environment.