==================
INSTALLING MAHOTAS
==================

From binary packages
--------------------

There are a few binary packages.

For **Windows**: Christoph Gohlke maintains binary packages at
http://www.lfd.uci.edu/~gohlke/pythonlibs/

For FreeBSD, there are ports packages at
http://www.freshports.org/graphics/mahotas/ Unfortunately, they may be slightly
out of date.

On NixOS, there are up-to-date packages available as ``pythonPackages.mahotas``
(packaged for Python 2.7, 3.4, and 3.5).

Using pip/easy_install
----------------------

Mahotas should install just fine with pip or easy_install. Either one of the
following should work::

    pip install mahotas
    easy_install mahotas

You will need to have numpy installed as well as a C++ compiler.

From source
-----------

You can use the simple::

    python setup.py install


You need the numpy headers and a C++ compiler.

Runtime Dependencies
--------------------

Only **numpy** is required, except:

You will need a way to load images into numpy arrays. Try one of the following
packages

1. `imread <http://github.com/luispedro/imread>`__
2. matplotlib
3. Freeimage

If you are running tests, ``scipy`` is sometimes used (as a comparison). It is
otherwise not used in mahotas (since version 0.7).

Compilation Dependencies
------------------------

You need numpy, the Python headers, and a C++ compiler.

Below, you can find information on specific Linux distributions. These will
install mahotas system-wide with all necessary dependencies.

Ubuntu
~~~~~~
::

    sudo apt-get install python-dev python-numpy g++ python-pip
    sudo pip install mahotas

Red Hat and Amazon Linux
~~~~~~~~~~~~~~~~~~~~~~~~

::
    sudo yum -y install gcc-c++ numpy python-devel
    sudo easy_install mahotas

