Install & Compatibility
Where this runs
tested against v0.5.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.910 runs
build_error
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 57.1s · import 7.224s · 1740.8MB
1823MB installed
● package 1823MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SpatialData
✓ from spatialdata import SpatialData
read_zarr
✓ from spatialdata import read_zarr
✗ from spatialdata.io import read_zarr
In older versions (<0.5) the import path was different. Currently read_zarr is exposed at the top level.
read_visium
✓ from spatialdata.io import read_visium
I/O functions are in spatialdata.io submodule.
Load an existing SpatialData Zarr dataset from disk and display its structure.
from spatialdata import SpatialData, read_zarr
sdata = read_zarr('path/to/data.zarr')
print(sdata) # inspect elements
Errors
Common errors & fixes
AttributeError: 'SpatialData' object has no attribute 'tables'
Trying to access elements via attribute (e.g., sdata.tables) in version >=0.7.0 where dict-style access is required.
fixUse sdata['table'] instead of sdata.table.
ImportError: cannot import name 'read_zarr' from 'spatialdata.io'
In spatialdata >=0.5, read_zarr moved to top-level from spatialdata.io.
fixChange import to 'from spatialdata import read_zarr'.
KeyError: 'Could not find element with key ...'
Trying to access an element that doesn't exist in the SpatialData object.
fixCheck available keys with print(sdata) or list(sdata._gen_elements()).
Upgrade
Version history
0.7.3latest on PyPI · released May 6, 2026
Audit
Dependencies
zarroptionalRequired for chunked, compressed array storage.
xarrayoptionalRequired for labeled multi-dimensional arrays.
anndataoptionalRequired for table (annotation) support.
daskoptionalOptional but recommended for out-of-core/lazy computations.