Hi,
The error is shown as the Figure. I’m new to python. I’d like to ask how to resolve this error.
Thanks,
Huazhen
Hi,
The error is shown as the Figure. I’m new to python. I’d like to ask how to resolve this error.
Thanks,
Huazhen
Hi Huazhen - sorry for the delay just wanted to let you know I’m looking into this!
-Sara
Hi Huazhen - would you be able to attach your entire jupyter. My inclination is that perhaps the path where cdo was installed cannot be found but it could also be due to your version of cdo (python-cdo error - CDO - Project Management Service).
You can use the os library like a linux/terminal command-line library and look through your environment with the os.environ command. For me, my cdo library can be found under ‘/usr/local/apps/’
Did you run the miniconda installer for cdo just curious?
-Sara
Hi Sara,
I ran the jupyter successfully on Google Colab, but failed on UNC ONDEMAND.
CMAQ_DMS_ChlorA.ipynb (27.9 KB)
On UNC ONDEMAND, python-cdo installation failed using the code in jupyter. Therefore, I used cdo module installed on UNC longleaf, /nas/longleaf/rhel8/apps/cdo/2.2.0/bin/cdo, which may lead to the error.
Thanks,
Huazhen
You could try changing your cdopath variable to /nas/longleaf/rhel8/apps/cdo/2.2.0/bin/cdo (however you may get a permissions denied error message).
You could also build your own python virtual environment:
python3.11 (or whichever version you want; 3.10 is fine too) -m venv /wherever/you/want/this/to/go
then: source /wherever/you/want/this/to/go/bin/activate.csh
then: pip install cdo
then: pip install ipykernel
then create a Jupyter kernel and link it to this venv:
python -m ipykernel install --user --name=venv --display-name=venv
You also don’t have to use venv as the name (choose whichever you want just maintain consistency)
And then you should be able to find your jupyter kernel here in the top-right part of you jupyter notebook:
(my venv is named geospatial_rh8 and it appears in the drop down if you click on it)