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)"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.If passed as a list, conditions are combined with logical AND. Optionally, lists within a list can be used to combine conditions with logical OR.
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.
Valid dependency specifications with plain English descriptions:
"numba"
:numba
must be present"numpy>=1.20.0"
:numpy
must be version 1.20.0 or higher["numpy>=1.20.0", "pandas>=1.3.0"]
:numpy
must be version 1.20.0 orhigher, and
pandas
must be version 1.3.0 or higher
[["numpy>=1.20.0", "pandas>=1.3.0"], "scikit-learn>=0.24.0"]
:scikit-learn
must be version 0.24.0 or higher, andnumpy
must be version 1.20.0 or higher, orpandas
must be version 1.3.0 or higher
Developers should note that package names in the PEP 440 specifier strings that should be provided are identical with the package names used in
pip install
commands or on PyPI, which in general is not the same as the import name of the package, e.g.,"scikit-learn"
as inpip install scikit-learn
, and not"sklearn"
, as inimport sklearn
.Developers can use
_check_soft_dependencies
fromskbase.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.