Closed RTarouca closed 1 year ago
It's not also working with AquaCrop OSPy 2.1.
!pip install aquacrop
!pip install numpy==1.22
Runtime > restart runtime
import aquacrop
worked for me
Thank you it did work however with caveats.
After starting a new session some messages appeared about "pip install aquacrop" and "pip install numpy==1.22". I have attached the file with the messages, but I have pasted below some parts to facilitate online searches about this issue.
Before I would not get such messages. To further improve this solution I would run the numpy command first. This avoids some of the messages however it creates new ones. One such example is "aquacrop 2.2.3 requires numpy<1.22.0,>=1.18.0, but you have numpy 1.22.0 which is incompatible." Probably it is not incompatible, but this is probable only becasue this is the current requirement of aquacrop 2.2.3. The model seems be working fine but further tests will continue.
Below, I put a part of the messages of the output window as to facilitate online searching. Please see the attached file with the fully displayed messages. Error_log_solution_Aquacrop.txt
"ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. lida 0.0.10 requires fastapi, which is not installed. lida 0.0.10 requires kaleido, which is not installed. lida 0.0.10 requires python-multipart, which is not installed. lida 0.0.10 requires uvicorn, which is not installed. flax 0.7.5 requires numpy>=1.22, but you have numpy 1.21.6 which is incompatible. jax 0.4.20 requires numpy>=1.22, but you have numpy 1.21.6 which is incompatible. jaxlib 0.4.20+cuda11.cudnn86 requires numpy>=1.22, but you have numpy 1.21.6 which is incompatible. plotnine 0.12.4 requires numpy>=1.23.0, but you have numpy 1.21.6 which is incompatible. tensorflow 2.14.0 requires numpy>=1.23.5, but you have numpy 1.21.6 which is incompatible. Successfully installed aquacrop-2.2.3 cffi-1.15.0 numba-0.58.0 numpy-1.21.6 WARNING: The following packages were previously imported in this runtime: [cffi,numpy] You must restart the runtime in order to use newly installed versions. (...)
Yeah there is no magic bullet here - each library can be difficult to manage. You'll want to use the pip install version trick and restart the runtime liberally if you run into issues.
AquaCrop-OSPy 2.2.3 current version (dec, 2022) was working early today, but now it can't be run. Colab installs it, but it cannot be imported with the command "import aquacrop". The message "ModuleNotFoundError: No module named 'aquacrop.solution.solution_root_zone_water' appears. See previous messages in the attachment.
An import aquacrop command was expected to run with no issues. This 'aquacrop.solution.solution_root_zone_water' was never an issue before.
I'm using Chrome which has been working fine with AquaCrop-OSPy in the Colab environment.
The fallback runtime version command was tried but is unavailable.
Coincidently, the same problem is happening in Visual Studio Code environment, which uses python 3.9 and libraries installed manually (no anaconda being used or something like that). This behaviour hints that the problem may lie in a python or python dependency update which happened today. The import aquacrop log is also included in the attachement because it may provide clues for the reasons of this error. Error_log_AquaCrop.txt