Skip to content

Commit

Permalink
docs: Update installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
pmplewa committed Feb 7, 2025
1 parent b519a6b commit 9ba4f0b
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,57 @@ A plugin to read whole-slide images within [napari].

---

## Installation
## Installation via pip

You can install `napari-wsi` via [pip]:

```bash
pip install napari-wsi[all]
pip install "napari-wsi[all]>=1.0"
```

This automatically installs all optional backends, as a shortcut for:

```bash
pip install napari-wsi[openslide,rasterio,wsidicom]
pip install "napari-wsi[openslide,rasterio,wsidicom]>=1.0"
```

In addition, to be able to read images using the `openslide` backend, it is
required to install the OpenSlide library itself, for example by installing the
[openslide-bin] python package (also via [pip]).

## Installation via conda

To set up a new [conda] environment for `napari-wsi` that also includes all
optional dependencies, create a new file named `napari-wsi.yml` with the
following content:

```yaml
name: napari-wsi
channels:
- conda-forge
dependencies:
- python=3.11
- napari-wsi=1.*
# napari
- napari
- pyqt
# openslide backend
- openslide>=4.0
- openslide-python>=1.4
# rasterio backend
- rasterio>=1.4
- pip:
# wsidicom backend
- wsidicom>=0.22
- numpy<=2.1 # for numba
```
Then create this environment by running:
```bash
conda env create -f napari-wsi.yml
```

# Description

This [napari] plugin provides a widget for reading various whole-slide image
Expand Down Expand Up @@ -62,6 +95,7 @@ viewer = Viewer()
viewer.open("CMU-1.svs", plugin="napari-wsi")
```

[conda]: https://conda-forge.org/
[napari]: https://github.com/napari/napari
[openslide]: https://github.com/openslide/openslide-python
[openslide-bin]: https://pypi.org/project/openslide-bin/
Expand Down

0 comments on commit 9ba4f0b

Please # to comment.