Installation

If you’re looking to use napari-imagej, there are a few ways to get it running.

Installing Within napari

If you have napari installed already, you can install napari-imagej directly within napari, by following these steps:

  1. Install OpenJDK 8 or OpenJDK 11.

    napari-imagej should work with whichever distribution of OpenJDK you prefer; we recommend zulu jdk+fx 8. You can also install OpenJDK from your platform’s package manager.

  2. Install Maven.

    You can either download it manually or install it via your platform’s package manager. The mvn --version command can be used to verify installation.

  3. Install napari-imagej with napari

    With napari running, navigate to the plugins menu Plugins>Install/Uninstall Plugins and type into the search bar napari-imagej. Click Install to install napari-imagej!

Once the installation is complete, napari-imagej is ready to use!

Installing From pip

napari-imagej can also be installed using pip, however it requires more steps. You’ll need Python3 if you don’t have it already.

We recommend using virtualenv to isolate napari-imagej from your system-wide or user-wide Python environments. Alternatively, you can use Mamba purely for its virtual environment capabilities, and then pip install everything into that environment:

mamba create -n napari-imagej python pip
mamba activate napari-imagej
  1. Install OpenJDK 8 or OpenJDK 11.

    napari-imagej should work with whichever distribution of OpenJDK you prefer; we recommend zulu jdk+fx 8. You can also install OpenJDK from your platform’s package manager.

  2. Install Maven.

    You can either download it manually or install it via your platform’s package manager. The mvn --version command can be used to verify installation.

  3. Install napari-imagej

    Using pip, we can install napari-imagej:

    pip install napari-imagej
    

Installing From Source

If you’re looking to develop napari-imagej, you’ll likely want to install from source. There are a couple of ways to get napari-imagej installed; as above, we recommend using Mamba to install napari-imagej:

Using Mamba

Mamba is the easiest way to install napari-imagej. To install Mamba, follow the instructions here.

  1. Clone the napari-imagej repository

    From a suitable location, use the following command to clone the napari-imagej repository:

    git clone https://github.com/imagej/napari-imagej
    cd napari-imagej
    
  2. Install napari-imagej

    The following line will download all necessary components to run napari-imagej, installing them into a mamba environment named napari-imagej.

    mamba env create
    

Using pip

napari-imagej can also be installed using pip, however it requires more steps. You’ll need Python3 if you don’t have it already.

We recommend using virtualenv to isolate napari-imagej from your system-wide or user-wide Python environments. Alternatively, you can use Mamba purely for its virtual environment capabilities, and then pip install everything into that environment:

mamba create -n napari-imagej python pip
mamba activate napari-imagej
  1. Install OpenJDK 8 or OpenJDK 11.

    napari-imagej should work with whichever distribution of OpenJDK you prefer; we recommend zulu jdk+fx 8. You can also install OpenJDK from your platform’s package manager.

  2. Install Maven.

    You can either download it manually or install it via your platform’s package manager. The mvn --version command can be used to verify installation.

  3. Install napari-imagej

    The following code section will clone the napari-imagej source into a subfolder of the local directory and install all Python components necessary for napari-imagej.

    git clone https://github.com/imagej/napari-imagej
    cd napari-imagej
    pip install .