many of my KNIME workflows use R scripting nodes. I used them also on a KNIME server. I recently tried to also run these workflows on the KNIME hub. As recommended by KNIME staff I used a conda environment propagator with appropriate configuation for this prupose. However, I am receiving the following error when I try to execute R scripting nodes on the KNIME Hub:
ERROR Conda Environment Propagation 3:3: Execute failed: The following packages are not available from current channels: - libintl=0.22.5 Current channels: - https://conda.anaconda.org/conda-forge To search for alternate channels that may provide the conda package you’re looking for, navigate to https://anaconda.org and use the search bar at the top of the page.
libintl is only available for Windows and macOS, while the execution contexts on Community Hub run on Linux. Since there are some known issues with the portability of Conda environments across OSes, I had a look at your Conda Environment Propagation node, where I noticed two things:
You have explicitly selected a lot of packages (incl. some Windows-specific ones) to be included in the environment
There are a lot of Python packages in your environment
When the Conda Environment Propagation node gets executed on a Community Hub Execution Context, it will try to create an environment with all the selected (“Include?”) packages with exactly the package versions on your machine (for reproducibility reasons). This will obviously fail for things like libintl and other packages that aren’t available for Linux. What I’d ask you to try is setting up a Conda environment (from the command line or the Anaconda Navigator) with only the packages mentioned in Step 2 of the documentation. Once you have done that, install only the relevant packages into the environment using the Conda CLI or Anaconda Navigator. Subsequently, give the “Include only explicitly installed” button a try in the Conda Environment Propagation node. This should only select the packages that you have explicitly requested to install into the environment and not their dependencies, which are often OS-dependent.
@sscholz you can set up the conda environment specifically for a Windows or macOS (or Linux) environment and you should do that. With case switches you can then activate the one that would suite the needs - maybe in a component.
Especially when having R within a conda environment you will have to check the packages and test them. Also it is best to keep the environment as minimalistic as possible and maybe create another one for different tasks.
Hi Stefan, thanks for the explanations. After many trials I finally got it working by
Installing a very minimal conda with generic R (without indicating the version in the name, although the version was 4.3.3.), and only the r-base and r-rserve packages, and no Python libraries.
in the conda environment propagation node only selecting “Inlcude only explicitly installed”
and 3)
Using KNIME in linux (I installed it under Ubuntu WSL in a windows environment).
From windows it is not working. I have yet not tried to configer the mlauber71 component for use in windows.
One final addition: If you select “Explicitely only installed” in the conda environment propagation node, you do not need the operation system switch. Then even a workflow with R compiled on Windows appears to be executable on the KNIME hub.
This is what I was hoping for, @sscholz. The idea here is that r-base , r-rserve, and r-essentials are platform-agnostic. Since this seems to be the case, the Conda Environment Propagation node will request and install packages for the operating system on which it’s executed. As soon as your script requires a Conda package that is not available on the “destination operating system”, it will fail, though, and you’ll have to fall back to @mlauber71’s solution…