I used to install the Env via KNIME. Now I wanted to use the DL Python Network Learner with scikit-learn which I installed via Anaconda.
The following error message appears in the Node:
DLL load failed: The specified module could not be found.
Traceback (most recent call last):
File “”, line 1, in
File “C:\Anaconda3-Envs\knime_tf2\lib\site-packages\sklearn_init_.py”, line 81, in
from .utils._show_versions import show_versions
File “C:\Anaconda3-Envs\knime_tf2\lib\site-packages\sklearn\utils_show_versions.py”, line 12, in
from ._openmp_helpers import _openmp_parallelism_enabled
ImportError: DLL load failed: The specified module could not be found.
I used Google, some suggest dependencies some threads suggest something completely.
Maybe it is a known issue and the community can help.
This sounds like (or at least similar to) a known issue that we have fixed recently. The fix will be part of the upcoming v4.3.2 release of KNIME Analytics Platform. I hope it will also apply to your problem.
In the meantime, you should be able to work around the issue by using the Manual option in the Preferences of the KNIME Python integration, where you need to point KNIME to a script that activates the conda environment that you want to use (also see Option 2: Manual in this section of the Python installation guide).
thanks for your reply. Is there a file/info where I can see the packages which are installed, when KNIME creates the environment?
Or is ist just fine to write “- python” into my own *.yml-file?
thanks and br,
Ah sorry, I should have been more specific. You can simply reuse your existing environment but activate it manually instead of having it selected under Conda in the Preferences. There is no need to create a new environment. The existing environment should have all required DLLs in place, the reason why one was reported as missing is that Python did not look for it at the correct locations (which should be resolved by the manual activation of the environment).
Having said that, yes, the packages installed by KNIME can also be found in the installation guide.
it was more of a follow up question - so I should also be more specific.
My question was, clicking on “New Environment” within “Preferences” does this use also a yml-File or is this hardcoded? But, I was able to get my answer by using the search in my KNIMEinstallation and found them in
plugins\org.knime.python2.envconfigs_4.3.0.v202011271353\envconfigs. I was wondering why KNIME is prompting me Python Version 3.6.12, when I’m using Anaconda 2020-11 with Python 3.8.
In both yml-Files I don’t see a - scikit-learn=a.bc and therefore I don’t think it is installed.
Ah, I see – Yes, the envconfigs folder you discovered is exactly where the YAMLs we use are stored (they should resemble the YAML listed in the installation guide I linked above, but it seems like the installation guide is slightly outdated by now). In those YAMLs, the version of Python is set to v3.6, which is why KNIME shows v3.6.12 in the Preferences. The Python version of an individual environment can differ from the version Anaconda/its base environment itself uses. We still use Python 3.6 by default since this is the version that is covered by our internal testing and is therefore “guaranteed” to work well with our integration. Newer versions of Python should mostly also work well for use in KNIME and we are working on also covering these in our tests and eventually updating the environment definitions.
That is correct. KNIME does not install scikit-learn (in fact, the environments that you can create via the Preferences are only intended as minimal environments that contain only exactly those packages that the bare Python nodes need in order to function). So installing scikit-learn yourself was the right thing to do and it is only because of the mentioned bug that it failed to load.
Just a brief follow-up: the problem of KNIME not finding some DLLs has been fixed in KNIME Analytics Platform 4.3.2, which was released yesterday. Please let us know if you should ever encounter this problem again in any of the newer versions of KNIME. Thanks!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.