Skip to content

Install TorchGeo 0.10 for Geospatial Deep Learning

Deploy TorchGeo 0.10.0 for geospatial deep learning: Python 3.12+, pip/uv/conda steps, GPU order, verify commands, and real install fixes.

5 min readIntermediate

Two ways people start geospatial deep learning: stitch GDAL, rasterio, custom Dataset classes, and a pile of CRS hacks yourself – or install TorchGeo and get CRS-aware datasets, samplers, multispectral transforms, and pretrained EO weights in one PyTorch domain library. If you need to train this week instead of debugging reprojection next month, take the library path.

TorchGeo 0.10.0 landed on PyPI on 14 Aug 2026. Below: system floors, copy-paste installs, GPU wheel order, verification, the failure modes that burn afternoons, and the 0.10 migration notes most “pip install and EuroSAT” posts skip.

System requirements before you touch pip

PyPI metadata and the install docs agree: Python ≥ 3.12. A leftover 3.10/3.11 venv will not resolve cleanly against 0.10.x – recreate the env before you chase bogus package conflicts.

Component Minimum (as of 0.10.0 docs, Aug 2026) Notes
Python 3.12+ 3.13/3.14 listed as supported in install docs
PyTorch 2.2+ Install the CUDA build first if you need GPU
torchvision 0.17+ Match the torch wheel
rasterio 1.4.3+ Often needs system GDAL
geopandas 1.0+ Raised in 0.10 dependency bumps
lightning 2.4+ Datamodules, tasks, CLI
OS Linux, macOS, Windows On Windows, plan on pip (see errors)
GPU Optional CUDA/ROCm speeds training; CPU is fine for smoke tests

Disk scales with what you download – tiny benchmark chips are light; full Landsat/Sentinel scenes plus foundation weights need tens of GB free.

Official download sources

Skip random wheels. Canonical paths:

conda-forge and Spack (py-torchgeo) exist. After a fresh release, pip/uv usually pick up the build first.

Install TorchGeo 0.10 step by step

Fresh venv. Year-old global torch plus new geospatial pins is how resolvers go sideways.

# Linux/macOS
python3.12 -m venv ~/.venvs/torchgeo
source ~/.venvs/torchgeo/bin/activate

# Windows (PowerShell)
py -3.12 -m venv $env:USERPROFILE.venvstorchgeo
$env:USERPROFILE.venvstorchgeoScriptsActivate.ps1

GPU path – order matters. Put CUDA torch on the machine before TorchGeo so pip does not quietly lock a CPU-only torch. Pick the index that matches your driver from pytorch.org; CUDA 11.8 wheels look like this:

pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118
pip install torchgeo

CPU-only / simplest:

pip install torchgeo

uv (documented alternative):

uv add torchgeo
uv add torchgeo --extra datasets --extra models

Extras for real EO work:

pip install "torchgeo[datasets,models]"
pip install "torchgeo[all]" # heavier: docs/style/tests too

conda-forge (no extras via conda):

conda config --add channels conda-forge
conda config --set channel_priority strict
conda install torchgeo

HPC: spack install py-torchgeo then spack load py-torchgeo.

Windows tip: Prefer pip inside a venv. Maintainer/community threads (including GitHub discussion #1538) report conda-forge solves stalling around rasterio/pytorch; pip is the path that usually finishes.

First-time configuration that actually matters

No global YAML. Minimum setup is: activated env, importable package, somewhere sane for data.

  1. Activate the venv in every shell and job script – easy to forget in tmux/CI.
  2. Pick a data root and pass root= into datasets/datamodules (example: /data/torchgeo). Do not scatter multi-GB scenes across $HOME.
  3. CLI: the package ships a torchgeo entry point on LightningCLI. Nothing else to daemonize.
  4. Checkpoints: 0.10 tightens defaults – checksum-by-default on many assets and torch.load(..., weights_only=True). Release notes call this hardening, not a regression.

Ever wonder how many silent CRS bugs vanish once sampling is geographic instead of “row 0:512, col 0:512” on a warped array? That is why people stop hand-rolling chips.

Verify the install works

python -c "import torch, torchgeo; print('torch', torch.__version__); print('torchgeo', torchgeo.__version__); print('cuda', torch.cuda.is_available())"
torchgeo --help

Expect 0.10.0 (or your pin) and CLI subcommands such as fit. CUDA false when you wanted true? Wrong torch wheel – fix torch, not TorchGeo.

Only after extras match the dataset:

python -c "from torchgeo.datasets import EuroSAT100; print('ok')"

Common install errors and fixes

1. ImportError: scipy required for this dataset (or h5py, laspy, …)
Base pip install torchgeo ships thin on purpose. Add the extra: pip install "torchgeo[datasets]". Official troubleshooting calls out optional groups datasets / models.

2. rasterio / GDAL build or import failures
Debian/Ubuntu: sudo apt-get install gdal-bin libgdal-dev. macOS: brew install gdal. Then pip install --force-reinstall rasterio (reinstall torchgeo if the import still dies).

3. conda UnsatisfiableError / multi-hour solve on Windows
Abandon the solve. Clean venv + pip. Mixing pytorch + nvidia + conda-forge without a pin file is the usual trap; limited Windows pytorch support on conda-forge makes it worse.

4. Wrong Python
PyPI: Requires-Python >=3.12. Recreate on 3.12+.

5. CPU torch when you expected GPU
Uninstall torch/torchvision → reinstall from the CUDA index URL → pip install --force-reinstall torchgeo.

Upgrade from older TorchGeo / uninstall

pip install -U "torchgeo==0.10.0"
# or latest:
pip install -U torchgeo

Backwards-incompatible changes in the v0.10.0 release notes:

  • torchgeo.trainerstorchgeo.tasks (drop the old Task suffix on class names where it applies)
  • Samplers redesigned for spatial@temporal composition; old file-oriented geo sampler patterns break
  • Samples are consistently dict[str, Tensor]; checksum-by-default; safer torch.load defaults

Dev tree:

git clone https://github.com/torchgeo/torchgeo.git
cd torchgeo
pip install -e ".[all]"

Cleanup:

pip uninstall torchgeo -y
rm -rf ~/.venvs/torchgeo # optional full wipe
# conda: conda remove torchgeo

FAQ

Is Docker required for TorchGeo?

No. Docs center on pip, uv, conda, and Spack. Containerize only if the cluster forces it – bake the same CUDA-then-torchgeo order into the image.

Do I need torchgeo[all] for production training?

Almost never. [all] drags docs, linters, and tests into a training job you will not ship. For common raster classification/segmentation: bare torchgeo plus [datasets], and [models] only if you need that extra weight stack. You want lightning + rasterio + whatever the datamodule imports – not pytest or sphinx.

Why did my old RandomGeoSampler script break after upgrading to 0.10?

Not a bad install. 0.10 redesigned samplers for full time-series support and renamed trainerstasks. Import errors that feel like “pip failed” are usually stale call sites. Skim the backwards-incompatible section once, fix imports, re-run the version/torchgeo --help checks – downgrade only if you are frozen to a paper artifact.

Next: activate the venv, run the version + CLI checks, then hit the official quickstart or CLI tutorial with a small datamodule and download=True on a box that has the disk budget.