How To Install Mahotas

The simplest way to install mahotas is to use conda.

If you have conda installed, you can install mahotas using the following pair of commands:

conda config --add channels conda-forge
conda install mahotas

This relies on the conda-forge project, which builds packages for all major environments (Linux, Mac OS X, and Windows). If you do not want to permanently add the conda-forge channel to your conda configuration, you can also install just mahotas with:

conda install -c mahotas

From source

You can get the released version using pip:

pip install mahotas

If you prefer, you can download the source from PyPI and run:

python install

You will need to have numpy and a C++ compiler.

Visual Studio

For compiling from source in Visual Studio, use:

python build_ext -c msvc
python install

Bleeding Edge (Development)

Development happens on github. You can get the development source there. Watch out that these versions are more likely to have problems.

Packaged Versions

On Windows

On Windows, Christoph Gohlke does an excelent job maintaining binary packages of mahotas (and several other packages).

Python(x, y)

If you use Python(x, y), which is often a good solution, then you probably have it already as mahotas is a standard plugin.

Enthought Canopy

Since May 2015, Enthought’s Canopy Package Index includes mahotas.


Mahotas is available for FreeBSD as graphics/mahotas.


For Macports, mahotas is available as py27-mahotas.


Mahotas is not a part of standard conda packages, but on 64 bit Linux, you can get it from this repository with:

conda install -c mahotas

Frugalware Linux

Mahotas is available as python-mahotas.