UU-Hydro / PCR-GLOBWB_model

PCR-GLOBWB (PCRaster Global Water Balance) is a large-scale hydrological model intended for global to regional studies and developed at the Department of Physical Geography, Utrecht University (Netherlands). Contact: Edwin Sutanudjaja (E.H.Sutanudjaja@uu.nl).
GNU General Public License v3.0
116 stars 79 forks source link

PCRaster Module not found #17

Closed mn5hk closed 2 years ago

mn5hk commented 2 years ago

When I try to run the following code: python deterministic_runner.py <ini_configuration_file (with absolute file path)>, python seems unable to detect the pcraster module.

I have tried to install pcraster inside the model folder using the following code: conda install -c conda-forge pcraster

However the issue persists. I would request a help to resolve it.

mn5hk commented 2 years ago

I just checked my conda environment. If I open Python from my conda environment, import pcraster and try to run it, it works.

import pcraster as pcr pcr.version

For some reason my conda environment python has pcraster; but when I run it, it is not able to access it..?

mn5hk commented 2 years ago

Hi, the issue is now solved. I believe the issue persisted because I had installed pcraster before pcrglobwb; and the conda environment could not find the pcraster module because of it. After several hit and trials, deleting and reinstalling conda, it now works.