Custom Python packages

Custom Python packages in Cloudera Workflow Orchestrator enable you to install additional dependencies during environment creation or updates so your DAGs and tasks can import required libraries.

How package installation works

When the feature is enabled, Cloudera Workflow Orchestrator installs the packages listed in the Custom Python Packages field during environment creation or updates. After installation completes, your DAGs and tasks can import those packages in the Cloudera Workflow Orchestrator environment.

Disabling the feature removes the previously installed custom packages during the next environment update.

Platform constraints

Cloudera Workflow Orchestrator installs custom packages using the platform Airflow constraints file. You do not need to add a --constraint option to your Custom Python Packages configuration.

The constraints file pins dependency versions that are tested with the Airflow version shipped in Cloudera Workflow Orchestrator. Custom package requirements must be compatible with those pinned versions. If a package requires a different version of an Airflow dependency, package installation can fail.

When adding Airflow providers or packages that depend on Airflow libraries, select versions compatible with the Cloudera Workflow Orchestrator Airflow version. Avoid pinning dependencies that conflict with the platform constraints.

Recommendations

  • Pin package versions explicitly instead of using unbounded requirements.
  • Keep the requirements.txt content minimal. Only add packages required by DAG code or task execution.
  • Do not paste secrets into the Custom Python Packages field. Use the Custom Python Packages Credentials field for private index authentication.
  • If installation fails, check for common issues such as invalid Base64 input, an unreachable package index, a .netrc host mismatch, a missing custom CA certificate, incompatible package constraints, or packages that require unsupported native build dependencies.