Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 2.44 KB

Install.md

File metadata and controls

57 lines (47 loc) · 2.44 KB

Installation

  1. Install Conda:

  2. Configure your shell for use with conda:

    conda init bash
    

    Where bash is the shell you use. Then start a new shell instance.

  3. Activate the conda-forge channel:

    conda config --add channels conda-forge
    conda config --set channel_priority strict
    
  4. Install pyimagej into a new conda environment:

    conda create -n pyimagej pyimagej openjdk=8
    
  5. Whenever you want to use pyimagej, activate its environment:

    conda activate pyimagej
    

Installation asides

  • The above command installs pyimagej with OpenJDK 8; if you leave off the openjdk=8 it will install OpenJDK 11 by default, which should also work, but is less well tested and may have more rough edges.

  • It is possible to dynamically install pyimagej from within a Jupyter notebook:

    import sys
    !conda install --yes --prefix {sys.prefix} -c conda-forge pyimagej openjdk=8
    

    This approach is useful for JupyterHub on the cloud, e.g. Binder, to utilize pyimagej in select notebooks without advance installation. This reduces time needed to create and launch the environment, at the expense of a longer startup time the first time a pyimagej-enabled notebook is run. See this itkwidgets example notebook for an example.

  • It is possible to dynamically install pyimagej on Google Colab. See this thread for guidance. A major advantage of Google Colab is free GPU in the cloud.

  • If you would prefer to install pyimagej via pip, more legwork is required. See this thread for hints.