Installing ESMF

Hi Pangeo/xESMF community,

I’m trying to use xESMF with the ESMF/ESMPy backend on Google Colab for regridding, but I keep running into problems with the ESMF installation. Specifically, I get errors like:
ModuleNotFoundError: No module named ‘ESMF’
esmf.mk file not found!

How are you going about the install?

I suspect you’re running into trouble with the compiled ESMF (and related) dependencies. Some package managers handle these better than others.

1 Like

Hello Pangeo Team

This problem persists as of Dec. 2025. xESMF/esmpy/esmf fails to properly install and run on Google Colab, at least via standard install methods.

If one does manage to get xESMF installed, and is able to locate and reference the esmf.mk file, then another error message indicates that the expected libstdc++ library is not being linked. What’s curious is that the condacolab package can be used to build and run xESMF in Colab, but an environment built with condacolab is activated and closed within each cell, defeating the purpose of interactive notebooks. So, I’ve tried every which way of manually leveraging conda/mamba in Colab to build an use an environment with xESMF, but to no avail. The libstdc++ error message is as far as I can get. Am I missing something simple?

If anybody on the Pangeo team can take note of this issue and help resolve it, then it would be greatly appreciated by me and many scientists who would benefit by harnessing xESMF on Colab.

Thank you