Install & Compatibility
Where this runs
tested against v0.20.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 16.0s · import 0.542s · 319MB
371MB installed
● package 371MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
earthkit.data
✓ import earthkit.data as ekd
✗ from earthkit import data
Most examples use 'import earthkit.data as ekd'; 'from earthkit import data' also works but can cause confusion.
realize
✓ from earthkit.data import from_source
✗ from earthkit.data.core import Base
Low-level core classes are not part of the public API; use from_source instead.
Load a GRIB file from a URL and convert to xarray.
import earthkit.data as ekd
# Load GRIB data from a URL
ds = ekd.from_source("url", "https://get.ecmwf.int/repository/test-data/earthkit-data/example.grib")
# Inspect metadata
print(ds[0].metadata("param"))
# Convert to xarray
xr_ds = ds.to_xarray()
print(xr_ds)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'eccodes'
Missing backend library for GRIB support.
AttributeError: 'Reader' object has no attribute 'metadata'
Using a method not available in the current source type (e.g., ODB objects do not have a single metadata concept).
fixFirst check the type of data: `print(type(ds[0]))` and use appropriate methods like `ds[0].keys()` for ODB.
earthkit.data.core.DataError: Unable to open resource
URL not accessible or file does not exist.
fixVerify the URL or file path. For URLs, ensure network access and correct URL syntax.
Upgrade
Version history
0.20.0latest on PyPI · released May 13, 2026
Audit
Dependencies
eccodesoptionalRequired for GRIB support
cfgriboptionalAlternative GRIB engine
netcdf4optionalRequired for NetCDF support