KNIME Conda Environment Set Up

Hello, is there a way to create a configure a Conda environment in KNIME which is effectively pre-set up? I’m creating a workflow I want to share with other people but want to avoid other users having to go through the same set up process but I need to use Conda since there are libraries I need that aren’t available within the bundled version.
Thanks :slight_smile:

In KNIME, you can create a pre-configured Conda environment for your workflow and share it with others. Here’s how you can do it:

  1. Set up your desired Conda environment with all the necessary libraries and dependencies.
  2. Export the Conda environment as a YAML file. You can do this by running the command conda env export > environment.yml in your terminal.
  3. In KNIME, go to File > Preferences > KNIME > Python.
  4. Click on “Add” to add a new Python environment.
  5. Choose “Conda Environment” and provide a name for the environment.
  6. In the “YAML File” field, browse and select the exported environment.yml file.
  7. Click “Apply” and “OK” to save the configuration.

Now, when you share your workflow, others can import the pre-configured Conda environment in KNIME by following these steps:

  1. In KNIME, go to File > Preferences > KNIME > Python.
  2. Click on “Add” to add a new Python environment.
  3. Choose “Conda Environment” and provide a name for the environment.
  4. In the “YAML File” field, browse and select the same environment.yml file.
  5. Click “Apply” and “OK” to save the configuration.

By sharing the pre-configured Conda environment, you ensure that other users can easily reproduce your workflow without going through the set-up process themselves.

4 Likes

Thanks @prashant7526, I’m trying to avoid as much configuration as possible as it can get confusing for people not familiar with KNIME. Is there a way to store the YAML file in the workflow folder and use a node to change to a Conda Environment and select the YAML file?

@TPattison glad you asked. I have written an article about Conda and KNIME *1). To store a conda environment you have created you can use the Conda Environment Propagation – KNIME Community Hub. The packages might be specific to your operating system so you might need one for each.


*1) KNIME and Python — Setting up and managing Conda environments

2 Likes

I do not think this is currently possible with the Conda Environment Propagation node. You can store the whole environment with all the details but you cannot employ a YAML file directly. Or maybe I do not see it …

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.