Skip to content

Environment Storage and Persistence

The Python Environment Provider node uses a lazy creation strategy. The node itself only defines the environment specification (generating a pixi.toml and pixi.lock file); the actual Python environment is not created until a downstream node, such as a Python Script or Python View node, is executed for the first time.

Temporary vs. Permanent Environments

By default, KNIME manages these environments as temporary resources to prevent disk clutter. You can control this behavior in the preferences.

Temporary Environments (Default)

When sharing a workflow, the environment is temporary by default for the recipient.

  • Location: Environments are stored in a subfolder of the KNIME temporary directory, which is OS-dependent.
  • Lifecycle: These folders are intended to be short-lived. If you close the workflow or restart KNIME, the environment is deleted and needs to be re-created upon the next execution.

Permanent Environments

If you frequently use the same complex environment, you can opt into permanent storage to avoid re-installation wait times.

  • How to Enable: Go to Preferences → KNIME → Conda and untick the box Store pixi environments temporarily.
  • Responsibility: Once made permanent, the user is responsible for managing these environments (e.g., manual deletion or updates).
  • Location: The base path for permanent environments can be configured in the preferences (stored in the .epf file as pixiEnvironmentBasePath).

The Port Object

The square output port of the PEP node is more than just a connection; it carries the environment specification.

  • Hover to Inspect: You can find the exact file path of the current environment by hovering your mouse over the output port of the PEP node or the input port of the downstream Python node.
  • Open port view for package details: Click Open port view to get a detailed list of requested and installed packages and their versions.
  • Concurrency: If multiple nodes require the same environment simultaneously, KNIME's internal logic ensures the environment is only installed once. Downstream nodes will wait for the installation to complete before starting execution.

Managing the Pixi Cache

Regardless of whether an environment is temporary or permanent, the underlying Pixi backend maintains a global cache of downloaded packages.

  • Efficiency: If two different PEP nodes require the same version of a library, it is only downloaded once.
  • Portability: The environment is strictly "OS-aware." While a Windows user might create the lock file, a Hub executor on Linux will use that same lock file to download the correct Linux-specific binaries.

INFO

Note for R Users: Currently, the PEP node is optimized for Python Script and Python View nodes. While technically possible in the future, support for R environments is not yet a primary feature.