Closed jgerardsimcock closed 6 years ago
Thanks for reporting. Problem confirmed. A workaround is making a softlink to libnetcdf.so
in the conda environment (ref: modelica-3rdparty/netCDF-DataReader#15, conda/conda#3973)
The first time of running import ESMF
should return a longer trace than what you've shown:
In the above error message, notice the line:
OSError: libnetcdf.so.11: cannot open shared object file: No such file or directory
Go to the lib/
folder of your conda environment (mine is called geo
, so the full path is ~/miniconda/envs/geo/lib
)
$ ls libnetcdf*
libnetcdf.a libnetcdff.a libnetcdff.so libnetcdff.so.6 libnetcdff.so.6.1.1 libnetcdf.settings libnetcdf.so libnetcdf.so.13
ESMPy is looking for libnetcdf.so.11
but it doesn't exist. So, simply create a new link:
$ ln -s libnetcdf.so libnetcdf.so.11
This solves my problem. Please see if it works for you. I will raise the issue upstream (or tell me if you already did that).
BTW, I can only reproduce this error on Ubuntu16.04, not on my Mac or using Docker-miniconda3. Seems like a system-specific issue.
Turns out that installing by conda install -c conda-forge esmpy
(not the NESII channel) solves the problem on Ubuntu.
The doc is updated accordingly: 26a4bd1476e4cd48425d6e0c6e6a8aff4321b46c
Thank you @JiaweiZhuang! This now works without issue. Installing esmpy from conda-forge channel was all that needed to be updated.
I've just installed the libraries as directed in the installation guide. When I
import xesmf
I get the following stack trace.Should I also raise this upstream in the esmfpy channel?