If DH_DND_PYTHON is set to true in your cluster.cnf file, then a default Python virtual environment is configured for Core+ workers. You can also create alternative Python virtual environments and assign them to your own custom worker kinds.

To install a Python environment for the Core+ worker, you must create a virtual environment and configure it properly for the installed Community version. Deephaven recommends placing them in /usr/illumon/coreplus/venv/.

In the following example, we create a default virtual environment in the /usr/illumon/coreplus/venv/41.0-custom directory. The requirements.txt file provides a list of packages and versions that Deephaven has tested with this distribution. You should use it as a starting point for adding, removing, or replacing packages. Deephaven does not test integrations with package versions other than those listed in requirements.txt.

In addition to the requirements.txt file (which references packages available via pip), you must also install the Deephaven Core+ worker wheel. It is recommended that you also install the Deephaven Core+ client wheel.

Note

In the snippets below, be sure to change the path to match your Core+ install and select the proper Community pip package version.

The following snippet installs a custom Python virtual environment with pip:

If, instead, you prefer to use conda, refer to the snippet below to install a custom Python virtual environment:

You must create the virtual environment on each query server.

Disable temporary virtual environments

By default, users can create temporary (ephemeral) virtual environments when starting a Code Studio session or configuring a Persistent Query. This allows them to install additional Python packages at startup.

To prevent users from creating temporary virtual environments for a worker kind, set the per-kind property in iris-environment.prop:

If not set, the default is true.

Note

After changing this property, users must reload their browser for the UI to reflect the new setting. Until they reload, the UI will not show the warning banner — but the controller will still block ephemeral venv creation server-side, which may cause unexpected failures for queries that request a temporary virtual environment.

When ephemeral virtual environments are disabled for a worker kind:

  • In the Code Studio and Query Monitor UIs, the Python Environment section is hidden for new configurations. For existing configurations that already have ephemeral_venv=true, the temporary virtual environment control remains visible but disabled, with a warning banner explaining the restriction.
  • Any existing query configuration that requests a temporary virtual environment will log a warning but still proceed — the controller will silently force ephemeral_venv to false when creating workers.
  • Worker creation requests that include ephemeral venv settings are sanitized by the controller so workers are created without ephemeral virtual environments.