pangeo-data / xESMF

Universal Regridder for Geospatial Data
http://xesmf.readthedocs.io/
MIT License
183 stars 32 forks source link

ModuleNotFoundError: No module named ESMF #218

Closed JasonFurtado closed 1 year ago

JasonFurtado commented 1 year ago

I am trying to work with xesmf on my Mac (MacOS Monterey v12.6.2) and I receive an error when importing xesmf. It states that it cannot find the module ESMF.

I am using python 3.11 with xesmf 0.3.0, esmf 8.4.0, and esmpy 8.4.0 installed, all from the conda-forge channel.

Sample code:

from matplotlib import pyplot as plt
import numpy as np
import pandas as pd
import xarray as xr
import xesmf as xe

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[2], line 1
----> 1 import xesmf as xe

File ~/miniconda3/envs/test/lib/python3.11/site-packages/xesmf/__init__.py:4
      2 from . import util
      3 from . import data
----> 4 from . frontend import Regridder

File ~/miniconda3/envs/test/lib/python3.11/site-packages/xesmf/frontend.py:10
      7 import os
      8 import warnings
---> 10 from . backend import (esmf_grid, esmf_locstream, add_corner,
     11                        esmf_regrid_build, esmf_regrid_finalize)
     13 from . smm import read_weights, apply_weights
     15 try:

File ~/miniconda3/envs/test/lib/python3.11/site-packages/xesmf/backend.py:19
      1 '''
      2 Backend for xESMF. This module wraps ESMPy's complicated API and can create
      3 ESMF Grid and Regrid objects only using basic numpy arrays.
   (...)
     15 So it would be helpful to catch some common mistakes in Python level.
     16 '''
     18 import numpy as np
---> 19 import ESMF
     20 import warnings
     21 import os

ModuleNotFoundError: No module named 'ESMF'

I have attached my environment as a file and copied it below.

# Name                    Version                   Build  Channel
_ipython_minor_entry_point 8.7.0                h0c17e10_0    conda-forge
anyio                     3.6.2              pyhd8ed1ab_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
appnope                   0.1.3              pyhd8ed1ab_0    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0          py311h5547dcb_3    conda-forge
asttokens                 2.2.1              pyhd8ed1ab_0    conda-forge
attrs                     22.1.0             pyh71513ae_1    conda-forge
babel                     2.11.0             pyhd8ed1ab_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                pyhd8ed1ab_3    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.11.1             pyha770c72_0    conda-forge
bleach                    5.0.1              pyhd8ed1ab_0    conda-forge
bokeh                     2.4.3              pyhd8ed1ab_3    conda-forge
brotli                    1.0.9                hb7f2c08_8    conda-forge
brotli-bin                1.0.9                hb7f2c08_8    conda-forge
brotlipy                  0.7.0           py311h5547dcb_1005    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
c-ares                    1.18.1               h0d85af4_0    conda-forge
ca-certificates           2022.12.7            h033912b_0    conda-forge
cartopy                   0.21.1          py311h3b1ae44_0    conda-forge
certifi                   2022.12.7          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py311ha86e640_3    conda-forge
cftime                    1.6.2           py311hd5badaa_1    conda-forge
charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge
click                     8.1.3           unix_pyhd8ed1ab_2    conda-forge
cloudpickle               2.2.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.1.2              pyhd8ed1ab_0    conda-forge
contourpy                 1.0.6           py311hd2070f0_0    conda-forge
cryptography              38.0.4          py311h61927ef_0    conda-forge
curl                      7.86.0               h6df9250_2    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cytoolz                   0.12.0          py311h5547dcb_1    conda-forge
dask                      2022.12.0          pyhd8ed1ab_0    conda-forge
dask-core                 2022.12.0          pyhd8ed1ab_0    conda-forge
debugpy                   1.6.4           py311h814d153_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
distributed               2022.12.0          pyhd8ed1ab_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
esmf                      8.4.0           nompi_hb8db5d0_1    conda-forge
esmpy                     8.4.0           nompi_py311hbbe2dff_1    conda-forge
executing                 1.2.0              pyhd8ed1ab_0    conda-forge
flit-core                 3.8.0              pyhd8ed1ab_0    conda-forge
fonttools                 4.38.0          py311h5547dcb_1    conda-forge
freetype                  2.12.1               h3f81eb7_1    conda-forge
fsspec                    2022.11.0          pyhd8ed1ab_0    conda-forge
geos                      3.11.1               hf0c8a7f_0    conda-forge
hdf4                      4.2.15               h7aa5921_5    conda-forge
hdf5                      1.12.2          nompi_h1f71328_100    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
icu                       70.1                 h96cf925_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
importlib-metadata        5.1.0              pyha770c72_0    conda-forge
importlib_resources       5.10.1             pyhd8ed1ab_0    conda-forge
intake                    0.6.6              pyhd8ed1ab_0    conda-forge
ipykernel                 6.19.2             pyh736e0ef_0    conda-forge
ipython                   8.7.0              pyhd1c38e8_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.18.2             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
joblib                    1.2.0              pyhd8ed1ab_0    conda-forge
jpeg                      9e                   hac89ed1_2    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.17.3             pyhd8ed1ab_0    conda-forge
jupyter_client            7.4.8              pyhd8ed1ab_0    conda-forge
jupyter_core              5.1.0           py311h6eed73b_0    conda-forge
jupyter_events            0.5.0              pyhd8ed1ab_0    conda-forge
jupyter_server            2.0.1              pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.4.2              pyhd8ed1ab_0    conda-forge
jupyterlab                3.5.1              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.16.5             pyhd8ed1ab_0    conda-forge
kiwisolver                1.4.4           py311hd2070f0_1    conda-forge
krb5                      1.20.1               h049b76e_0    conda-forge
lcms2                     2.14                 h90f4b2a_0    conda-forge
lerc                      4.0.0                hb486fe8_0    conda-forge
libblas                   3.9.0           16_osx64_openblas    conda-forge
libbrotlicommon           1.0.9                hb7f2c08_8    conda-forge
libbrotlidec              1.0.9                hb7f2c08_8    conda-forge
libbrotlienc              1.0.9                hb7f2c08_8    conda-forge
libcblas                  3.9.0           16_osx64_openblas    conda-forge
libcurl                   7.86.0               h6df9250_2    conda-forge
libcxx                    14.0.6               hccf4f1f_0    conda-forge
libdeflate                1.14                 hb7f2c08_0    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libev                     4.33                 haf1e3a3_1    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgfortran               5.0.0           11_3_0_h97931a8_27    conda-forge
libgfortran5              11.3.0              h082f757_27    conda-forge
libiconv                  1.17                 hac89ed1_0    conda-forge
liblapack                 3.9.0           16_osx64_openblas    conda-forge
libnetcdf                 4.8.1           nompi_hc61b76e_106    conda-forge
libnghttp2                1.47.0               h5aae05b_1    conda-forge
libopenblas               0.3.21          openmp_h429af6e_3    conda-forge
libpng                    1.6.39               ha978bb4_0    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libsqlite                 3.40.0               ha978bb4_0    conda-forge
libssh2                   1.10.0               h47af595_3    conda-forge
libtiff                   4.4.0                hdb44e8a_4    conda-forge
libwebp-base              1.2.4                h775f41a_0    conda-forge
libxcb                    1.13              h0d85af4_1004    conda-forge
libxml2                   2.10.3               hb9e07b5_0    conda-forge
libzip                    1.9.2                h6db710c_1    conda-forge
libzlib                   1.2.13               hfd90126_4    conda-forge
llvm-openmp               15.0.6               h61d9ccf_0    conda-forge
locket                    1.0.0              pyhd8ed1ab_0    conda-forge
lz4                       4.0.2           py311haa801a3_0    conda-forge
lz4-c                     1.9.3                he49afe7_1    conda-forge
markupsafe                2.1.1           py311h5547dcb_2    conda-forge
matplotlib                3.6.2           py311h6eed73b_0    conda-forge
matplotlib-base           3.6.2           py311h2bf763f_0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mistune                   2.0.4              pyhd8ed1ab_0    conda-forge
msgpack-python            1.0.4           py311hd2070f0_1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
nbclassic                 0.4.8              pyhd8ed1ab_0    conda-forge
nbclient                  0.7.2              pyhd8ed1ab_0    conda-forge
nbconvert                 7.2.6              pyhd8ed1ab_0    conda-forge
nbconvert-core            7.2.6              pyhd8ed1ab_0    conda-forge
nbconvert-pandoc          7.2.6              pyhd8ed1ab_0    conda-forge
nbformat                  5.7.0              pyhd8ed1ab_0    conda-forge
ncurses                   6.3                  h96cf925_1    conda-forge
nest-asyncio              1.5.6              pyhd8ed1ab_0    conda-forge
netcdf-fortran            4.6.0           nompi_h96bf37d_101    conda-forge
netcdf4                   1.6.2           nompi_py311h41bc3eb_100    conda-forge
notebook                  6.5.2              pyha770c72_1    conda-forge
notebook-shim             0.2.2              pyhd8ed1ab_0    conda-forge
numpy                     1.23.5          py311h62c7003_0    conda-forge
openjpeg                  2.5.0                h5d0d7b0_1    conda-forge
openssl                   3.0.7                hfd90126_1    conda-forge
packaging                 22.0               pyhd8ed1ab_0    conda-forge
pandas                    1.5.2           py311hd84f3f5_0    conda-forge
pandoc                    2.19.2               h694c41f_1    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
partd                     1.3.0              pyhd8ed1ab_0    conda-forge
pexpect                   4.8.0              pyh1a96a4e_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.2.0           py311he7df5c9_3    conda-forge
pip                       22.3.1             pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_0    conda-forge
platformdirs              2.6.0              pyhd8ed1ab_0    conda-forge
proj                      9.1.0                hcbd9701_0    conda-forge
prometheus_client         0.15.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.36             pyha770c72_0    conda-forge
psutil                    5.9.4           py311h5547dcb_0    conda-forge
pthread-stubs             0.4               hc929b4f_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.13.0             pyhd8ed1ab_0    conda-forge
pyopenssl                 22.1.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pyproj                    3.4.1           py311h871f4d8_0    conda-forge
pyrsistent                0.19.2          py311h5547dcb_0    conda-forge
pyshp                     2.3.1              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.11.0          h559f36b_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.16.2             pyhd8ed1ab_0    conda-forge
python-json-logger        2.0.1              pyh9f0ad1d_0    conda-forge
python_abi                3.11                    3_cp311    conda-forge
pytz                      2022.6             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0             py311h5547dcb_5    conda-forge
pyzmq                     24.0.1          py311habfacb3_1    conda-forge
readline                  8.1.2                h3899abd_0    conda-forge
requests                  2.28.1             pyhd8ed1ab_1    conda-forge
scikit-learn              1.2.0           py311h087fafe_0    conda-forge
scipy                     1.9.3           py311h939689b_2    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                65.5.1             pyhd8ed1ab_0    conda-forge
shapely                   2.0.0           py311h781b04c_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.3.2.post1        pyhd8ed1ab_0    conda-forge
sqlite                    3.40.0               h9ae0607_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
tblib                     1.7.0              pyhd8ed1ab_0    conda-forge
terminado                 0.17.1             pyhd1c38e8_0    conda-forge
threadpoolctl             3.1.0              pyh8a188c0_0    conda-forge
tinycss2                  1.2.1              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h5dbffcc_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tornado                   6.2             py311h5547dcb_1    conda-forge
tqdm                      4.64.1             pyhd8ed1ab_0    conda-forge
traitlets                 5.7.1              pyhd8ed1ab_0    conda-forge
typing_extensions         4.4.0              pyha770c72_0    conda-forge
tzdata                    2022g                h191b570_0    conda-forge
urllib3                   1.26.13            pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.4.2              pyhd8ed1ab_0    conda-forge
wheel                     0.38.4             pyhd8ed1ab_0    conda-forge
xarray                    2022.12.0          pyhd8ed1ab_0    conda-forge
xesmf                     0.3.0                      py_0    conda-forge
xorg-libxau               1.0.9                h35c211d_0    conda-forge
xorg-libxdmcp             1.1.3                h35c211d_0    conda-forge
xz                        5.2.6                h775f41a_0    conda-forge
yaml                      0.2.5                h0d85af4_2    conda-forge
zeromq                    4.3.4                he49afe7_1    conda-forge
zict                      2.2.0              pyhd8ed1ab_0    conda-forge
zipp                      3.11.0             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hfd90126_4    conda-forge
zstd                      1.5.2                hfa58983_4    conda-forge

I have tried installing a new environment and reinstalling the packages one at a time and it still gives me the same error message. Thank you in advance for your help.

environment.txt

huard commented 1 year ago

Try with xESMF 0.7.0,

huard commented 1 year ago

Also, I don't believe we've ever tested xESMF with python 3.11, so you're in uncharted territory. PRs welcome.

JasonFurtado commented 1 year ago

I switched to python 3.10. The latest version of xesmf available for python 3.10 on conda-forge is 0.6.3. Still receive the same error.

Additional note: I have xesmf package installed on my Linux server with python 3.10.8 and it works on there. On the Linux machine, I have xesmf 0.6.3, esmpy 8.2.0, and esmf 8.2.0.

(test) MacBook-Pro-7:~ jfurtado$ conda search -c conda-forge xesmf
Loading channels: done
# Name                       Version           Build  Channel             
xesmf                          0.1.1          py35_0  conda-forge         
xesmf                          0.1.1          py36_0  conda-forge         
xesmf                          0.1.1          py36_1  conda-forge         
xesmf                          0.1.1          py37_1  conda-forge         
xesmf                          0.1.2            py_0  conda-forge         
xesmf                          0.2.0          py36_0  conda-forge         
xesmf                          0.2.0          py37_0  conda-forge         
xesmf                          0.2.1            py_0  conda-forge         
xesmf                          0.2.2            py_0  conda-forge         
xesmf                          0.3.0            py_0  conda-forge         
xesmf                          0.4.0    pyhd8ed1ab_0  conda-forge         
xesmf                          0.5.0    pyhd8ed1ab_0  conda-forge         
xesmf                          0.5.1    pyhd8ed1ab_0  conda-forge         
xesmf                          0.5.2    pyhd8ed1ab_0  conda-forge         
xesmf                          0.5.3    pyhd8ed1ab_0  conda-forge         
xesmf                          0.6.0    pyhd8ed1ab_0  conda-forge         
xesmf                          0.6.1    pyhd8ed1ab_0  conda-forge         
xesmf                          0.6.2    pyhd8ed1ab_0  conda-forge         
xesmf                          0.6.3    pyhd8ed1ab_0  conda-forge         
xesmf                          0.6.3    pyhd8ed1ab_1  conda-forge         
aulemahal commented 1 year ago

xESMF 0.7.0 was released today, it might take a few hours (or days...) to update conda-forge. The immediate fix is to pin esmpy < 8.4 in your environment.

thenaomig commented 1 year ago

For what it's worth I am getting this very same error. I'm using an image built on Saturn Cloud specifying the latest pangeo requirements from here: https://github.com/pangeo-data/pangeo-docker-images/blob/master/pangeo-notebook/environment.yml This is what my built environment ended up looking like: built_enviro.txt

thenaomig commented 1 year ago

Building the image again, with the only difference being to specify esmpy<8.4 (per discussion above), has solved the problem for now of importing xesmf. This is the new built environment, just in case this is helpful to anyone working on this.

built_enviro2.txt

axelschweiger commented 1 year ago

Have that same problem with python 3.11 and esmpy 8.4.0

sbland commented 1 year ago

Just got this issue with python 3.8.

The following steps resulted in a successfully build environment (You may be able to remove some of these steps if not needed)...

Aoe-sdh commented 2 months ago

got the same error with python 3.11 and xesmf 0.8.5

aulemahal commented 2 months ago

Hi @Aoe-sdh, can you provide more details on your error ? The exact issue of the first post here was fixed in xESMF >=0.7. I believe you might be having a different one with the same symptom. Also, could you specify which version of ESMpy you have in your environment ?

Aoe-sdh commented 2 months ago

@aulemahal Hi, the ESMpy is 8.4.2 and ESMF is 8.4.2 too. The following is my error message: Traceback (most recent call last): File "D:\miniconda3\envs\geo_map\Lib\site-packages\esmpy\interface\loadESMF.py", line 26, in esmfmk = os.environ["ESMFMKFILE"]


  File "<frozen os>", line 679, in __getitem__
KeyError: 'ESMFMKFILE'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\miniconda3\envs\geo_map\Lib\site-packages\xesmf\backend.py", line 22, in <module>
    import esmpy as ESMF
  File "D:\miniconda3\envs\geo_map\Lib\site-packages\esmpy\__init__.py", line 112, in <module>
    from esmpy.api.esmpymanager import *
  File "D:\miniconda3\envs\geo_map\Lib\site-packages\esmpy\api\esmpymanager.py", line 9, in <module>
    from esmpy.interface.cbindings import *
  File "D:\miniconda3\envs\geo_map\Lib\site-packages\esmpy\interface\cbindings.py", line 13, in <module>
    from esmpy.interface.loadESMF import _ESMF
  File "D:\miniconda3\envs\geo_map\Lib\site-packages\esmpy\interface\loadESMF.py", line 28, in <module>
    raise ImportError('The ESMFMKFILE environment variable is not available.')
ImportError: The ESMFMKFILE environment variable is not available.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\1.Projects\002.WRF\HJ\0Code\wrfout_hj_clip.py", line 8, in <module>
    import xesmf as xe
  File "D:\miniconda3\envs\geo_map\Lib\site-packages\xesmf\__init__.py", line 4, in <module>
    from .frontend import Regridder, SpatialAverager
  File "D:\miniconda3\envs\geo_map\Lib\site-packages\xesmf\frontend.py", line 14, in <module>
    from .backend import Grid, LocStream, Mesh, add_corner, esmf_regrid_build, esmf_regrid_finalize
  File "D:\miniconda3\envs\geo_map\Lib\site-packages\xesmf\backend.py", line 24, in <module>
    import ESMF
ModuleNotFoundError: No module named 'ESMF'
aulemahal commented 2 months ago

I think you are having this issue : https://github.com/pangeo-data/xESMF/issues/269 Either try to deactivate-reactivate your env, or if this doesn't work, see my comment (2nd on the linked issue) for a fix.

The bug comes from ESMF and I did push a successful fix for it in its latest version, 8.6, but they were not able to release a windows build on conda. Linux and Mac users can now install the fixed version, but not windows users who have to rely on the fixes above.

search-0110 commented 1 week ago

@aulemahal Hi, in my environment the esmpy and esmf version is 8.4.2, and xesmf version is 0.8.6, in the same question when I fellow the issue change the ESMFMKFILE, I get these error message:

Traceback (most recent call last): File ~.conda\envs\VPRM\Lib\site-packages\esmpy\interface\loadESMF.py:151 _ESMF = np.ctypeslib.load_library('esmf_fullylinked',libsdir) File ~.conda\envs\VPRM\Lib\site-packages\numpy\ctypeslib.py:156 in load_library return ctypes.cdll[libpath] File ~.conda\envs\VPRM\Lib\ctypes__init.py:457 in getitem return getattr(self, name) File ~.conda\envs\VPRM\Lib\ctypes\init.py:452 in getattr__ raise AttributeError(name) AttributeError: C:\Users\INTERLINK.conda\envs\VPRM\Library\lib\esmf_fullylinked.dll

During handling of the above exception, another exception occurred: Traceback (most recent call last): File ~.conda\envs\VPRM\Lib\site-packages\xesmf\util.py:8 import esmpy as ESMF File ~.conda\envs\VPRM\Lib\site-packages\esmpy__init__.py:112 from esmpy.api.esmpymanager import File ~.conda\envs\VPRM\Lib\site-packages\esmpy\api\esmpymanager.py:9 from esmpy.interface.cbindings import File ~.conda\envs\VPRM\Lib\site-packages\esmpy\interface\cbindings.py:13 from esmpy.interface.loadESMF import _ESMF File ~.conda\envs\VPRM\Lib\site-packages\esmpy\interface\loadESMF.py:157 raise ImportError('The ESMF shared library did not load properly.') ImportError: The ESMF shared library did not load properly.

During handling of the above exception, another exception occurred: Traceback (most recent call last): Cell In[4], line 32 vprm_inst.add_land_cover_map(handler_lt, save_path=veg_file, File ~.conda\envs\VPRM\Lib\site-packages\pyVPRM\VPRM.py:474 in add_land_cover_map import xesmf as xe File ~.conda\envs\VPRM\Lib\site-packages\xesmf__init__.py:3 from . import data, util File ~.conda\envs\VPRM\Lib\site-packages\xesmf\util.py:10 import ESMF ModuleNotFoundError: No module named 'ESMF'

Do you know why this error occurs?

aulemahal commented 1 week ago

Hi @search-0110 , really sorry but I can't see an obvious reason for that bug here. I do not work on a windows computer, so I'm not able to test this at the moment.

Instead of importing xESMF could you try importing import esmpy in your console instead ? If that gives a similar error, then I suggest you open an issue to the esmpy folks, here https://github.com/esmf-org/esmf. Make sure to explain that you are using the conda build of esmf/esmpy and that you did the ESMFMKFILE thing.