Project

General

Profile

CDO - python 3 working in Windows 10

Added by João Janeiro over 4 years ago

Hi all,

I'm looking after a way of being able to use cdo for python 3 in windows 10.
From what I saw in this forum I got a bit confused about if it is possible and how to achieve it.
Can someone send me a ligth here please?

Best

João


Replies (2)

RE: CDO - python 3 working in Windows 10 - Added by Ralf Mueller over 4 years ago

hola João!

your right: there are several options to do this:

  1. the nativ windows 10 Linux subsystem: https://docs.microsoft.com/en-us/windows/wsl/install-win10
  2. the cygwin POSIX layer: http://www.cygwin.com

Both variants offer multiple ways to get a working CDO binary AND a good integration of the native windows file system.

CDO can be installed (for option 1) via:
  • the ubuntu package manager (not the latest release version AFAIK)
  • with Anaconda
  • with Spack
  • from source
for option 2, you can
  • use the pre-compiled binary from the download area
  • compile with spack
  • build from source

both paths also offer python3 packages and installation of user libraries within the environment. But a native CDO binary for windows10 binary does not exsit.

hth
ralf

RE: CDO - python 3 working in Windows 10 - Added by João Janeiro over 4 years ago

Thanks for your reply Ralf!

So my problem is that I'm building a Python program that needs to run in Windows 10 environment, as it interacts with different other programs that only run in windows.
Option 2 I've already tried it and it works, but that means that I need to execute a instance of cygwin each time I need to pass a cdo comand. Because I'm looking to optimize the time needed to run the code I was looking at a more elegant solution.
I've also installed the Linux environment in windows and cdo, but I'm guessing it will only work when the python program is run in Linux.
I guess I'll have to altered the code to go with cygwin.

Best

João

    (1-2/2)