Install package in conda environment

Hello knimers,

I try to install a certain package called epo_ops (more information: python-epo-ops-client · PyPI) but I do not know how I can handle the installation of external packages.

I already implemented a Conda Environment Propagation to start a certain python code within knime.
Here are my packages I have installed until yet…:

I already used the installation tutorial of the following link:
/Conda Environment Propagation – KNIME Hub

Furthermore I tried to handle this with

pip install python-epo-ops-client

via the anaconda prompt but there is a error message left:
No module named ‘epo_ops’
Traceback (most recent call last):
File “”, line 2, in
ModuleNotFoundError: No module named ‘epo_ops’

Can you help me to install this package ?

BR Bastian

The error message you posted doesn’t match the pip command. Your error shows underscore not hyphens. Maybe a typo?

I tried on a linux instance with conda 4.9.2 your command and it worked fine.

Are you using the default conda channel, or did you modify the channels?

3 Likes

Hello,

now i tried the command in the following picture using conda 4.10.1:

Unfortunately the packages are not found in the current channels you can see in the screenshot…
What I am missing?
Is there an opportunity to install the package for windows?
BR

Hi @8bastian8,

Can you confirm that you executed the pip install python-epo-ops-client from your original post inside your py3_knime conda environment? (Looking at your first screenshot, this seems to be the environment that you want to use inside KNIME, right?) Otherwise pip will install the package to your base conda environment.
The second screenshot you posted suggests that this was at least not the case when you tried to install the package via conda (conda install -c auto python-epo-ops-client): the leading (base) in your command line indicates that you were inside the base conda environment. You have to switch to your py3_knime conda environment by executing conda activate py3_knime first. After that (py3_knime) should appear at the beginning of the command line. Execute pip install python-epo-ops-client again. After that, execute conda list -n py3_knime and verify that the package is contained in the displayed list.
Finally, open the configuration dialog of your Conda Environment Propagation node in KNIME. The package should now show up in the list but its “Include?” checkbox will be unchecked. Check the box and re-execute the node and your downstream Python scripting node. The ModuleNotFound error should now be gone. If the error persists, then please make sure that you are actually using the propagated environment in the scripting node (py3_knime should be selected on the scripting node’s Executable Selection tab).

Hope that helps!

Marcel

4 Likes

Thank you for your help and the precise answer! Now it works :slight_smile:

2 Likes

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