Python Environment Creation Problem

I’m trying to update from Python 3.6 to 3.8. I’ve installed Python through Anaconda. When I try to create the Knime environment I got the following error:

@rfeigel I would recommend using Miniconda and creating an environment from just conda-forge using the KNIME examples.

I manually installed numpy and pandas and the error went away. I thought the whole idea of creating a Knime environment was to automatically load the basic dependencies.

2 Likes

@rfeigel yes it is and most of the time it does work. No idea why sometimes it does not.

Using a separate yaml file gives you more control also. Concerning the repositories used for example.

2 Likes

Agree with yml file. And in my experience so far especially if you keep installing things and at some point need to update conda itself or python version, it will simply not work. So it is often easier to just delete and recreate the environment. But then important to document, what you installed after initial creation and adjust your yml accordingly.

1 Like

@kienerj on a Windows machine you can (currently) see the YAML files used under:

\knime_4.5.x\plugins\org.knime.python2.envconfigs_4.5.x.yyyyyyyyyy\envconfigs

that can help to build one’s own configuration. If you already have built an environment and want to save it in a ‘clean’ (reusable) way the way to go seems to be the --from-history function:

Linux …

conda env export --from-history | grep -v “prefix” > environment.yaml

Windows:

conda env export --from-history | findstr -v “prefix” > environment.yaml

3 Likes

under MacOSX the YML / YAML files can be found in a path like this:

/Applications/KNIME 4.5.0.app/Contents/Eclipse/plugins/org.knime.python2.envconfigs_4.5.x.yyyyyyyyyy

image

The paths might change in further versions.A general article about KNIME, Python and conda environments:

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