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 https://conda.anaconda.org/conda-forge mahotas
From source¶
Mahotas supports Python 3.7 through 3.13.
You can get the released version using pip:
pip install mahotas
For development, install from a checkout with:
pip install -e .[tests]
This installs the test dependencies and the Meson build tools needed by the
Makefile rebuild targets. You will also need a C++ compiler.
To rebuild the editable install after changes, use:
make fast
make debug
Visual Studio¶
On Windows, Meson will use Visual Studio automatically when you build from source. For a normal install, use:
python -m pip install .
For a debug-style editable install, use:
python -m pip install -e . --no-deps --no-build-isolation --config-settings=build-dir=build/debug --config-settings=setup-args=-Dbuildtype=release --config-settings=setup-args=-Db_ndebug=false
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 excellent job maintaining binary packages of mahotas (and several other packages).
WinPython¶
WinPython ships with mahotas as a standard package
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.
FreeBSD¶
Mahotas is available for FreeBSD as graphics/mahotas.
MacPorts¶
For Macports, mahotas is available as py-mahotas.
conda¶
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 https://conda.binstar.org/luispedro mahotas
Frugalware Linux¶
Mahotas is available as python-mahotas.