Registry / analytics / datacube

datacube

JSON →
library1.9.20pypypi✓ verified 85d ago

Open Data Cube (ODC) is an open-source analysis environment for satellite and other Earth observation data, providing a gridded data cube abstraction over petabyte-scale archives. Current version is 1.9.20, with regular releases targeting geospatial and remote sensing workflows.

pip install datacube
INSTALL
IMPORT
SIG · DATACUBE
D
datacube
analyticspythonv1.9.20
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

datacube
import datacube
VirtualProduct
from datacube.model import VirtualProduct
Dataset
from datacube.model import Dataset

Initialize a Datacube instance and list available products. Loading data requires a configured ODC index (PostgreSQL) and product data.

import datacube # Quick local test; in production use a proper config dc = datacube.Datacube(app='my_app', config='/etc/datacube.conf') products = dc.list_products() print(products) # Load some data (adjust product/dataset) try: data = dc.load(product='ls8_nbar_scene', x=(10, 11), y=(40, 41), time=('2020-01-01', '2020-01-10')) print(data) except Exception as e: print(f"Loading failure (expected if no ODC backend): {e}")
Debug
Known issues
breakingPython 3.10+ required as of datacube 1.9.0; Python 3.9 and below are no longer supported.
fix
Upgrade to Python >=3.10.
affects: >=1.9.0
breakingMajor API rewrite: `datacube.Datacube()` replaced the legacy `datacube.Datacube(env='...')` and many internal methods changed signatures.
fix
See migration guide at https://datacube-core.readthedocs.io/en/latest/ops/migration.html
affects: >=1.8
deprecated`dc_organise` and `dc_sync` CLI tools are deprecated in favor of `datacube dataset` subcommands.
fix
Use `datacube dataset organize` and `datacube dataset sync` instead.
affects: >=1.8.5
gotchaThe default config file is `/etc/datacube.conf`; if not present, initializing a Datacube without config will fail silently or raise a cryptic error.
fix
Set the `DATACUBE_CONFIG_PATH` environment variable or pass a config path to the constructor.
affects: all
gotcha`dc.load()` with `group_by='solar_day'` may produce unexpected results if data spans multiple time zones; always inspect the output coordinate.
fix
Use `group_by='time'` for standard UTC days.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'datacube'
Package not installed or installed in a different virtual environment.
fix
Run `pip install datacube` and ensure your environment is activated.
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused
PostgreSQL (database) is not running or misconfigured.
fix
Start PostgreSQL, verify connection settings in datacube.conf, and ensure the host/port are correct.
AttributeError: module 'datacube' has no attribute 'Datacube'
Possibly an older version of datacube (pre-1.8) installed, or import conflict with a different package named 'datacube'.
fix
Upgrade to the latest version: `pip install --upgrade datacube` and verify with `python -c "import datacube; print(datacube.__version__)"`
RuntimeError: You must authenticate to use this functionality
ODC is configured to use cloud-hosted data requiring authentication (e.g., AWS S3).
fix
Set AWS credentials via environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`) or configure a `~/.aws/credentials` file.
Upgrade
Version history
1.9.20latest on PyPI · released May 28, 2026
Audit
Dependencies
numpyrequiredCore array operations
xarrayrequiredLabeled multi-dimensional arrays
rasteriorequiredReading/writing geospatial raster data
cachetoolsoptionalCaching data cube metadata
Agent activity
40 hits · last 30 days
node
35
Amazon
1
OpenAI (training)
1
Resources