Pre-built installation
----------------------

`Windows binaries
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-image>`__
are kindly provided by Christoph Gohlke (note that, when upgrading,
you should first uninstall any older versions).

The latest stable release is also included as part of
`Enthought Canopy <https://www.enthought.com/products/canopy/>`__,
`Python(x,y) <http://code.google.com/p/pythonxy/wiki/Welcome>`__ and
`Anaconda <https://store.continuum.io/cshop/anaconda/>`__.

On Debian and Ubuntu, a Debian package ``python-skimage`` can be found in
`the Neurodebian repository <http://neuro.debian.net>`__. Follow `the
instructions <http://neuro.debian.net/#how-to-use-this-repository>`__ to
add Neurodebian to your system package manager, then look for
``python-skimage`` in the package manager.

On systems that support setuptools, the package can be installed from the
`Python packaging index <http://pypi.python.org/pypi/scikit-image>`__ using


::

  easy_install -U scikit-image

or

::

  pip install -U scikit-image

Installation from source
------------------------

Obtain the source from the git-repository at
`http://github.com/scikit-image/scikit-image
<http://github.com/scikit-image/scikit-image>`_ by running::

  git clone http://github.com/scikit-image/scikit-image.git

in a terminal (you will need to have git installed on your machine).

If you do not have git installed, you can also download a zipball from
`https://github.com/scikit-image/scikit-image/zipball/master
<https://github.com/scikit-image/scikit-image/zipball/master>`_.

The SciKit can be installed globally using::

  python setup.py install

or locally using::

  python setup.py install --prefix=${HOME}

If you prefer, you can use it without installing, by simply adding
this path to your ``PYTHONPATH`` variable and compiling extensions
in-place::

  python setup.py build_ext -i

Building with bento
-------------------

``scikit-image`` can also be built using `bento
<http://cournape.github.io/Bento/>`__.  Bento depends on `WAF
<https://code.google.com/p/waf/>`__ for compilation.

Follow the `Bento installation instructions
<http://cournape.github.io/Bento/html/install.html>`__ and `download the WAF
source <http://code.google.com/p/waf/downloads/list>`__.

Tell Bento where to find WAF by setting the ``WAFDIR`` environment variable::

    export WAFDIR=<path/to/waf>

From the ``scikit-image`` source directory::

    bentomaker configure
    bentomaker build -j     # (add -i for in-place build)
    bentomaker install      # (when not builing in-place)

Depending on file permissions, the install commands may need to be run as sudo.
 
.. include:: ../../DEPENDS.txt
