I have a persistent error trying to use the eo-learn library, even with example scripts like: link. The error occurs just by trying to import the eo-learn modules in the script; I am always getting the error:
No module named ‘eolearn.core.utilities’
I’ve installed the eo-learn library following the instructions in the documentation. But until now, I was not able to sort this error.
I would really appreciate it if you could help me.
a lot of issues with package versions arose when we released eo-learn 1.0 and I suspect this is one of them as well. I have some additional questions:
Are you installing via pip or conda?
What are the versions of your eo-learn and eo-learn.core. If you’re using pip you can do that with pip show eo-learn and pip show eo-learn.core. For conda you can do conda list and find them in the listed packages.
Sadly our updates for conda recipes haven’t been reviewed yet, so you will need to wait a bit before you can install eo-learn 1.0 which works with the example you linked.
You can find the same example, but compatible with version 0.10.1, on our github page here.
Thank you Ziga, but I already tried with the example that you share and got the same error. However, may I try another version of eo-learn for conda? Which version do you recommend?
Just to double-check, did you try the example I linked to? So the example at the 0.10.1 tag of git history, and not the same example on the main branch?
If that one does not work then there is a problem in the eo-learn you have installed (not just it’s version).
Yes, I tried with the 0.10.1 tag example, and I am getting the same error. I don’t know what could go wrong with the installation, I performed it following the instructions in this link for the anaconda example.
Should I try with a pip installation instead of using anaconda?
We had some issues with the conda recipes (and we are waiting for them to accept the fix), so right now the conda installation is a bit risky. I would advise installing with pip, since that is regularly tested by us. The conda version should also be viable soon if you wish to switch back later.
Hello Ziga, just to let you know that the pip installation went fine. Now I can import all the libraries without issues. Thank you so much for the workaround, I hope you can fix the anaconda version soon.
The full error is indeed very helpful. You appear to be running code (possibly a jupyter notebook) that is outdated. LinearWorkflow has been removed in eo-learn 1.0.0, which is why the import fails. Are you running an example notebook? Perhaps I can point you to a similar one which is kept up-to-date.
We sadly only have a much smaller timelapse GIF example.
You can try using linearly_connect_tasks, which replaced the LinearWorkflow. You can see a minor example of it here, hidden in the comment. Basically instead of LinearWorkflow(a, b, c) you can do EOWorkflow(linearly_connect_tasks(a, b, c)). But I cannot guarantee that is the only thing that needs to be updated.