Installation#
You can install lazyslide with different package manager you prefer.
The default installation.
pip install lazyslide
uv add lazyslide
conda install conda-forge::lazyslide
mamba install lazyslide
If you want to install the latest version from the GitHub repository, you can use the following command:
pip install git+https://github.com/rendeirolab/lazyslide.git
Installation of slide readers#
LazySlide uses wsidata to handle the IO with the slide files. To support different file formats, you need to install corresponding slide readers. The reader will be automatically detected by wsidata when you open the slide file.
TiffSlide is a cloud native openslide-python replacement based on tifffile.
TiffSlide is installed by default. You don’t need to install it manually.
pip install tiffslide
OpenSlide is a C library that provides a simple interface to read whole-slide images.
OpenSlide is installed by default, you don’t need to install it manually.
But you can always install from PyPI
pip install openslide-python openslide-bin
In case your OpenSlide installation is not working, you can install it manually.
For Linux and OSX users, it’s suggested that you install openslide with conda or mamba:
conda install -c conda-forge openslide-python
# or
mamba install -c conda-forge openslide-python
For Windows users, you need to download compiled openslide from
GitHub Release.
If you open the folder, you should find a bin folder.
Make sure you point the bin folder for python to locate the openslide binary.
You need to run following code to import the openslide,
it’s suggested to run this code before everything:
import os
with os.add_dll_directory("path/to/openslide/bin"):
import openslide
BioFormats is a standalone Java library for reading and writing life sciences image file formats.
scyjava is used to interact with the BioFormats library.
pip install scyjava
CuCIM is a GPU-accelerated image I/O library.
Please refer to the CuCIM GitHub.