No module named 'helper' in Use Case notebook

Dear all, I am in the openEO Platform server and I got the “UC3 - Crop type feature engineering (rule-based).ipynb” and added it to my folder called “sample notebooks”. When I run its first cell, I get the following error:

Thanks for your help!

Hi Amalia,
the file was next to the original notebook, just like the

you’ll want to copy that over as well, or even better, check out the entire repository to avoid that you run into other dependency issues.
Do note that the error in the screenshot is about eo_utils, while there does seem to be an file, and the error in your post is about ‘helper’. In any case, I believe Python notebooks can import code in files alongside the notebook…

best regards,

Hi Jeroen, thanks for the quick answer. You are right, I pasted the wrong screenshot. Thanks for your help: I have now cloned the repository SSR_Notebooks and run the UC3 notebook that came inside. However I now get this error:

Thanks again in advance

Hi Amalia,
this code has a number of dependencies that are (apparently) not in the Jupyterlab environment by default.
The easy solution is to install the dependency, for instance, running this in a separate cell might already work:

!pip install --user earthpy
Mind the exclamation mark which executes bash commands from inside a notebook, you can also open a ‘terminal’ window and run the same thing without the exclamation mark.

Sometimes, dependencies are not really used after all by a certain notebook, in which case you can comment them out. This is however more tricky as you may get other errors further down the line related to the missing import :slight_smile:

Hope that helps!

That is great to know, I have tried it both from inside the notebook (with the “!”) and from a terminal window (without the “!”) but this error below comes back in both cases:


What is the best way to proceed?

Dear @amalia.castro.11,
as stated by the PyPi documentation earthpy should be installed via conda. The jupyterlab environment itself supports this.
Please use the following command to install earthpy:
conda install -c conda-forge earthpy
Please note that you should always prefer to install packages into a conda environment via conda install and not with pip as this might break the entire environment.

1 Like

That solved it, thanks so much !