openslide-bin is a pip-installable, self-contained build of the OpenSlide C library and its essential dependencies for Windows, macOS, and Linux. It is maintained by the OpenSlide project to simplify the installation of the native OpenSlide library, which is required by the `openslide-python` bindings for reading whole-slide images (WSI). The current version is 4.0.0.13, and releases are tied to OpenSlide C library updates and build fixes.
pip install openslide-bin openslide-pythonVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to open a whole-slide image using `openslide-python` (which leverages the `openslide-bin` installed native library), extract its properties, generate a thumbnail, and read a specific region. Ensure you have a valid WSI file (e.g., .svs) to test.
Upgrade your Python environment to 3.9 or higher. (e.g., `conda create -n openslide_env python=3.9` or `pyenv install 3.9.x`)
Always install both `openslide-bin` and `openslide-python` via pip (e.g., `pip install openslide-bin openslide-python`). The Python code will then `import openslide`.
Ensure `openslide-bin` is installed. If issues persist, manually add the `bin` directory of your OpenSlide installation (e.g., `site-packages/openslide/openslide-win64-XXXX/bin`) to the system PATH environment variable, or use `os.add_dll_directory()` in your Python code before `import openslide`.
For Python-only use, the recommended approach is to install both `openslide-bin` and `openslide-python` using `pip`. If using a package manager like `conda`, install both via `conda` from the same channel (e.g., `conda install openslide-python openslide -c conda-forge`). Avoid mixing methods.