I am new to using using NCO tools and their Python bindings for working with netCDF files. I have successfully installed the NCO tools and the pynco package (using pip) following the instructions here. But I am getting an error when I try to initialize an object.
Here are the commands I'm using:
from nco import Nco
nco = Nco()
And the error is:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Python27\ArcGIS10.5\lib\site-packages\nco\nco.py", line 54, in __init__
self.NCOpath = os.path.split(which('ncks'))[0]
File "C:\Python27\ArcGIS10.5\lib\ntpath.py", line 180, in split
d, p = splitdrive(p)
File "C:\Python27\ArcGIS10.5\lib\ntpath.py", line 115, in splitdrive
if len(p) > 1:
TypeError: object of type 'NoneType' has no len()
This suggests to me that the install may not have worked properly, though I can run NCO commands from the command line.
Any idea what the problem may be?