Skip to content

Installation

This guide walks you through installing the RatioPath library and its required binary dependencies for working with whole-slide images (WSI).

Python Requirement

You need Python 3.11 or newer to run ratiopath.

Binary Dependencies

OpenSlide

OpenSlide is required to read most WSI formats. You must install the native library before (or alongside) the Python package.

Linux (Debian / Ubuntu)

sudo apt-get update
sudo apt-get install -y openslide-tools

macOS (Homebrew)

brew update
brew install openslide

Windows

Download and install the OpenSlide binaries.

Alternative: Python wheels

If you cannot install system packages, you can try using openslide-bin from PyPI.

pip install openslide-bin

Warning

This method bundles the OpenSlide library and is not compatible with pyvips. Avoid using them together.

Install the Python Package

Choose your preferred package manager to install the library.

uv add ratiopath
pip install ratiopath
pdm add ratiopath