Installation#
You need Python 3.12 or newer. We recommend managing dependencies in a project-specific virtual environment using uv, to avoid dependency conflicts with the rest of your system.
Development install#
spatialrefinery is not yet published to PyPI. Install the latest development version directly from GitHub:
uv add git+https://github.com/peng-lab/spatialrefinery.git
pip install git+https://github.com/peng-lab/spatialrefinery.git
Optional: CZI support#
Reading Zeiss CZI images (via bioio) is an optional extra, kept separate because it pulls in additional native dependencies:
pip install "spatialrefinery[czi] @ git+https://github.com/peng-lab/spatialrefinery.git"
Without the czi extra, convert_to_ometiff still handles every other registered format
(.svs, .ndpi, .tif, .tiff, .mrxs, .scn, .bif, .vms, .svslide) – only .czi requires it.
Verifying the install#
import spatialrefinery
print(spatialrefinery.__version__)
If this prints a version string without raising an ImportError, you’re ready for the tutorials.