Installation¶
One command installs Zeit with pre-compiled wheels for Windows, macOS and Linux. Build from source only if you want to change the Rust core.
Standard Installation¶
The easiest way to install Zeit is via Python's package manager, pip. We provide pre-compiled binaries (wheels) for Windows, macOS, and Linux (x86_64 and aarch64, glibc 2.28 or newer), supporting Python 3.9 and newer. Because we distribute pre-compiled binaries, you do not need a compiler (Rust or any other) installed on your machine for the standard installation. The wheels run the compiled core on all your cores on every system, macOS included.
This command automatically installs all required Python dependencies, including xarray, dask, scikit-learn, rasterio, and pystac-client. The deep learning of zeit.ai needs PyTorch, a large download, which comes with the ai extra:
Since 2.3, PyTorch is optional
Up to zeit 2.2, pip install zeit-cdts installed PyTorch too. Code that uses zeit.ai now needs pip install "zeit-cdts[ai]" (or PyTorch installed by other means, such as the build for a GPU's CUDA from pytorch.org); without it, import zeit.ai says so. Everything else needs no PyTorch.
macOS: Apple Silicon vs. Intel
Prebuilt wheels are published for whichever architecture GitHub Actions' macos-latest runner uses at build time, which is Apple Silicon (arm64) as of this writing. If pip install zeit-cdts on an Intel Mac reports no matching distribution, pip will fall back to building from source automatically — see Installing from Source below for the Rust toolchain that requires.
Verifying the Installation¶
Once installed, confirm the package and its CLI are working:
Optional Dependencies¶
To look at maps and time series with zeit.plot (matplotlib for figures, anywidget for the interactive viewer in notebooks):
pip install zeit-cdts[plot]
pip install pywebview # optional: show the viewer in a native window outside notebooks
The embeddings of TESSERA and AlphaEarth need nothing extra: geotessera, which reads TESSERA, is installed with zeit on Python 3.12 or newer (it does not support older ones).
For development and running tests, you can install the optional development dependencies:
Caches¶
What zeit downloads is kept in one folder, with a subfolder per kind: weights (the pretrained weights of zeit.ai), embeddings (TESSERA and AlphaEarth downloads), tiles (the tiles a tile run built or received), map-tiles (the basemaps of zeit.plot), l1c (the Sentinel-2 .SAFE directories of zeit.download_l1c) and dem (the DEM mosaics of zeit.download_dem). The folder is, from the first that is set:
| Folder | |
|---|---|
ZEIT_CACHE_DIR |
as given |
XDG_CACHE_HOME |
$XDG_CACHE_HOME/zeit |
| Windows | %LOCALAPPDATA%\zeit |
| elsewhere | ~/.cache/zeit |
On a cluster, point ZEIT_CACHE_DIR at the scratch space (export ZEIT_CACHE_DIR=/scratch/$USER/zeit-cache): the home directory's quota is small, and some compute nodes see it read-only. zeit doctor shows each folder and whether it can be written. A cache that zeit 2.2 or older filled in ~/.cache/zeit keeps being used there until ZEIT_CACHE_DIR is set.
On a computer without internet access (the compute nodes of many clusters), fill the cache beforehand where there is access, with zeit fetch: zeit fetch weights, zeit fetch tiles urls.txt, zeit fetch embeddings .... Without it, zeit says what it could not reach and which zeit fetch downloads it. The weights can also come from a folder of copies, named by ZEIT_WEIGHTS.
Installing from Source¶
If you need to modify the Rust core, use the latest unreleased features, or build the package on an unsupported architecture, you will need to install Zeit from the source.
Requirements¶
- Python 3.9+
- A Rust toolchain (stable), installed with rustup:
On Windows, run
rustup-init.exefrom rustup.rs; it also offers to install the Visual Studio build tools Rust links with. - macOS only: the Xcode Command Line Tools, for the linker. Install them first if you haven't already:
Instructions¶
-
Clone the repository from GitHub:
-
Install the package in editable mode:
This builds the compiled core (zeit._core) from the Rust crates in rust/ (zeit-core, the algorithms; zeit-py, their Python bindings) with setuptools-rust, in release mode. After changing the Rust code, rebuild it in place with:
The core is multi-threaded on every system, macOS included, with no extra library: it starts its own threads, so there is no OpenMP to install or enable.
GPU Acceleration for zeit.ai¶
The deep learning models in zeit.ai (UTAE, LTAE/LightTAE, TempCNN, Presto, Siamese Change Detector, Prithvi) are plain PyTorch nn.Modules and run on whatever device you move them to — none of them hard-code CUDA.
- NVIDIA GPUs (Linux/Windows):
pip install "zeit-cdts[ai]"installs PyTorch's build with CUDA support on Linux; on Windows, and for a given CUDA version, installtorchfirst as pytorch.org says. Usetorch.device("cuda")as usual. - Apple Silicon (any M-series chip): PyTorch's Metal (
mps) backend gives you native GPU acceleration on macOS — no CUDA or extra install needed, since it ships in the sametorchpackage:Every tutorial in AI & Deep Learning picksdevice = torch.device("mps" if torch.backends.mps.is_available() else "cpu") model = model.to(device)"cuda"vs."cpu"in its example — swap in the snippet above on macOS to use the GPU. - CPU fallback: works everywhere, just slower.
On a cluster, see Zeit on a Cluster (--gres=gpu:1, and the GPU container image with Apptainer's --nv).
Docker and MPS
The Docker image is built on a CUDA base image and has no access to Apple's Metal APIs. To use mps acceleration on macOS, install Zeit natively with pip rather than through Docker.