Project

General

Profile

Errors occurred when running CDO with cygwin

Added by Yunlei Wu about 4 years ago

Hello Fellow users,
I have browsed all related questions in Forums, but still not find the solution.
I am using Cygwin in win10 and I want to run the CDO in Python using Cygwin. I installed the python 3.6 in Cygwin and CDO package in python. But when I ran the CDO, I was told that the models are missing, so I quitted the Python environment and install those dependency packages using Cygwin pip, like pandas and NumPy, but I failed. Thus, CDO can't work well in a python environment.
I attached the 'basic_info' to show the basic information about CDO in the Python environment and 'install_package_problem' to show the error when I tried to install packages.
I appreciate it if you can give me any hints to solve it.


Replies (3)

RE: Errors occurred when running CDO with cygwin - Added by Ralf Mueller about 4 years ago

hi Yunlei!

sorry for the late reply - I checked things last week, but didn't manage to put things together here in the forum. Here is what I could do in your setup (Win10+cygwin):

  • there is a cygwin packlage python37-numpy (also 27 and 36 in case you prefer those). Please use this instead of pip - no need to install it manually
  • I installed the following package via cygwin:
    1. python37
    2. python37-devel
    3. python37-numpy
    4. python37-pip
    5. python37-setuptools
    6. netcdf
    7. libnetcdf-devel
    8. libnetcdf-cxx4-devel (propably not needed)
    9. gcc-g++
    10. gcc-core
    11. gcc-gfortran

With those I could install XArray within a cygwin termional via

pip3.7 install xarray --user

Please give it another try

hth
ralf

RE: Errors occurred when running CDO with cygwin - Added by Ralf Mueller about 4 years ago

Please note that Windows10 offers a built-in Linux subsystem based on ubuntu (type "ubuntu" in the search field of your task bar and start it as an administrator if possible). This comes with a pre-puild cdo package (cdo-1.9.3):

  • update the existing subsystem
    sudo apt-get update
  • install cdo
    sudo apt-get install cdo
  • install python+pip:
    sudo apt-get install python3-pip
  • install directly python3-numpy and python3-xarray with apt-get like above
  • install cdo.py:
    pip3 install cdo --user

Have Fun!

RE: Errors occurred when running CDO with cygwin - Added by Yunlei Wu about 4 years ago

Hello Ralf,
Thanks for your reply. I tried to follow your instruction to install the packages via Cygwin but I can't install the xarray within Cygwin terminal. This command gave me the error shown in the image 'error'. Later, I uninstalled the all packages related to python 3.6 and installed the packages related to python 3.7 via Cygwin. I tried to install the xarray again and it still gave me the same error.
I appreciate it if you give me further hints to solve this problem.

error.png (105 KB) error.png
    (1-3/3)