ITK is on PyPI: “pip install itk” is here!

The Python Package Index (PyPI), also known as the Cheese Shop, is the official and most extensive collection of Python packages; there are currently over 110,000 packages on PyPI. The Insight Toolkit (ITK) is a comprehensive open-source toolkit for multidimensional image analysis. ITK’s Python wrapping is now readily installable from any standard CPython installation via PyPI.

Binary Python wheels are available for Linux, macOS, and Windows, for Python 2.7 and the recent Python 3.X. These binary wheels are built to be compatible with Python distributions from Python.org, system package managers like apt and Homebrew, and Anaconda. When a binary package is not available for the current platform, an sdist is provided that will guide a researcher through the steps to build the packages from source code.

To install ITK from the command line, run:

python -m pip install --upgrade pip
python -m pip install itk

The itk metapackage will pull in the subpackages itk-segmentation, itk-registration, itk-numerics, itk-io, itk-filtering, and itk-core. These packages can also be installed independently if only a portion of the toolkit is desired.

ITK Python package dependency graph.

For more information on ITK’s Python wrapping, see an introduction in the ITK Software Guide. There are also many downloadable examples documented in Sphinx.

Enjoy ITK!

This post is a part of a series on Python and ITK. For additional information, see:

Leave a Reply