How to install napari on your machine

Welcome to the napari installation guide!

This guide will teach you how to do a clean install of napari and launch the viewer.

Note

If you want to contribute code back into napari, you should follow the development installation instructions in the contributing guide instead.

Prerequisites

Prerequisites differ depending on how you want to install napari.

Prerequisites for installing napari as a Python package

This installation method allows you to use napari from Python to programmatically interact with the app. It is the best way to install napari and make full use of all its features.

It requires:

You may also want:

  • an environment manager like conda or venv (Highly recommended)

Prerequisites for installing napari as a bundled app

This is the easiest way to install napari if you only wish to use it as a standalone GUI app. This installation method does not have any prerequisites.

Click here to see instructions for installing the bundled app.

Checking it worked

After installation you should be able to launch napari from the command line by simply running

napari

An empty napari viewer should appear as follows.

Note

You can check the napari version, to ensure it’s what you expect, for example the current release 0.4.18, using command: napari --version .

macOS desktop with a napari viewer window without any image opened in the foreground, and a terminal in the background with the appropriate conda environment activated (if applicable) and the command to open napari entered.

Choosing a different Qt backend

napari needs a library called Qt to run its user interface (UI). In Python, there are two alternative libraries to run this, called PyQt5 and PySide2. By default, we don’t choose for you, and simply running python -m pip install napari will not install either. You might already have one of them installed in your environment, thanks to other scientific packages such as Spyder or matplotlib. If neither is available, running napari will result in an error message asking you to install one of them.

Running python -m pip install "napari[all]" will install the default framework, which is currently PyQt5–but this could change in the future. However, if you have a Mac with the newer arm64 architecture (Apple Silicon), this will not work–see note-m1.

To install napari with a specific framework, you can use:

python -m pip install "napari[pyqt5]"    # for PyQt5

# OR
python -m pip install "napari[pyside2]"  # for PySide2

Note

For arm64 macOS machines (Apple Silicon), pre-compiled PyQt5 or PySide2 packages (wheels) are not available on PyPI, the repository used by pip, so trying to pip install napari[all] or either of the variants above will fail. However, you can install one of those libraries separately, for example from conda-forge, and then use pip install napari.

Note

If you switch backends, it’s a good idea to pip uninstall the one you’re not using.

Install as a bundled app

napari can also be installed as a bundled app on each of the major platforms, MacOS, Windows, and Linux with a simple one-click download and installation process. You might want to install napari as a bundled app if you are unfamiliar with installing Python packages or if you were unable to get the installation process described above working. The bundled app version of napari is the same version that you can get through the above described processes, and can still be extended with napari plugins installed directly via the app.

Important

Note that the bundled app is still in active development, and may not be very stable. We strongly recommend installing as a Python package instead.

To access the cross platform bundles you can visit our release page and scroll to the release you are interested in. For example, the bundles for napari 0.4.18 can be accessed here. To get to the download link, just scroll all the way to bottom of the page and expand the Assets section. You can then download the appropriate file for your platform.

Next steps

  • to start learning how to use napari, checkout our getting started tutorial

  • if you are interested in contributing to napari please check our contributing guidelines

  • if you are running into issues or bugs, please open a new issue on our issue tracker

    • include the output of napari --info (or go to Help>Info in the viewer and copy paste the information)

  • if you want help using napari, we are a community partner on the imagesc forum and all usage support requests should be posted on the forum with the tag napari. We look forward to interacting with you there!