Simplify installation instructions

This commit is contained in:
Stefan van der Walt
2015-05-29 11:23:16 -07:00
parent 38e5919248
commit 580db16cb1
+42 -119
View File
@@ -1,72 +1,52 @@
Installing scikit-image
-----------------------
If you are on Mac OS X you're lucky, open the terminal and install
scikit-image with pip::
=======================
Standard Python installation
----------------------------
From the shell, execute::
pip install scikit-image
Conda-based distributions (Anaconda, Miniconda)
-----------------------------------------------
For Python 3 use pip3 instead::
pip3 install scikit-image
For other systems, please read on.
Linux, Mac and Windows
----------------------
An easy light weight method to get scikit-image installed on all of the most
popular operating systems is by using miniconda_. Go over and grab the
appropriate miniconda_ version for your operating system and install it. When
you have miniconda_ installed, open a terminal and install scikit-image
with conda::
From the shell/command prompt, execute::
conda install scikit-image
If you prefer *not* using miniconda, find instructions for your operating
system below.
Windows
-------
Scikit-image comes with the Python distributions Anaconda_,
`Enthought Canopy`_, `Python(x,y)`_, and `WinPython`_.
If you install any of them, scikit-image should already be installed.
``scikit-image`` comes pre-installed with several Python
distributions, including Anaconda_, `Enthought Canopy`_,
`Python(x,y)`_ and `WinPython`.
.. _Anaconda: https://store.continuum.io/cshop/anaconda/
.. _Enthought Canopy: https://www.enthought.com/products/canopy/
.. _Python(x,y): http://code.google.com/p/pythonxy/wiki/Welcome
.. _WinPython: https://winpython.github.io/
If you are using the distribution from python.org_, you'll need to
manually download a few packages: numpy, scipy and scikit-image from
`Christoph Gohlke's`_ website. Python wheels are installed using::
If you prefer the regular Python distribution from python.org_, you can
install scikit-image manually by downloading packages. You will need numpy_,
scipy_ and the scikit-image package. You can find the packages in `Christoph
Gohlke's`_ web page with compiled Python packages. Here is the direct link to
the `scipy section`_, `numpy section`_ and `scikit-image section`_. Make sure
you download the right version for your system. E.g. numpy for Python 3.4 64
bit would be ``numpy-1.9.2+mkl-cp34-none-win_amd64.whl``.
pip install SomePackage-1.0-py2.py3-none-any.whl
To install Gohlke's packages, use pip::
Debian and Ubuntu
-----------------
On Debian and Ubuntu install scikit-image with::
pip install wheel
pip install --find-links Downloads scikit-image
sudo apt-get install python-skimage
Here ``--find-links Downloads`` means that pip will look for packages in the
folder named `Downloads`. Make sure that is where you saved the packages from
Gohlke.
Building from source
--------------------
As you see, installing scikit-image with pip requires some extra manual labor,
so using a Python distribution is recommended on Windows.
If you have a brave soul, you can also install scikit-image on Windows by
compiling it from source::
Execute the following command from the shell::
pip install scikit-image
Windows
```````
If you experience the error ``Error:unable to find vcvarsall.bat`` it means that
distutils is not correctly configured to use the C compiler. Modify (or create,
if not existing) the configuration file ``distutils.cfg`` (located for
@@ -76,82 +56,47 @@ example at ``C:\Python26\Lib\distutils\distutils.cfg``) to contain::
compiler=mingw32
For more details on compiling in Windows, there is a lot of knowledge iterated
into the `setup of appveyor`_ (a continious integration service).
into the `setup of appveyor`_ (a continuous integration service).
.. _miniconda: http://conda.pydata.org/miniconda.html
.. _python.org: http://python.org/
.. _numpy: http://www.numpy.org/
.. _scipy: http://www.scipy.org/
.. _Christoph Gohlke's: http://www.lfd.uci.edu/~gohlke/pythonlibs/
.. _numpy section: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
.. _scipy section: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
.. _scikit-image section: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-image
.. _setup of appveyor: https://github.com/scikit-image/scikit-image/blob/master/appveyor.yml
Debian and Ubuntu
-----------------
On Debian and Ubuntu install scikit-image with::
sudo apt-get install python-skimage
Or if you use Python 3::
sudo apt-get install python3-skimage
On Ubuntu scikit-image is found in the `universe repo`_, and python-skimage can
also be found in the `Neurodebian repository`_. For using the repository
follow the `Neurodebian instructions`_ to add Neurodebian to your system
package manager.
Ubuntu 14.04 LTS ships with version 0.9.3 of scikit-image, so if you need an
up-to-date version you must compile scikit-image yourself. First install the
dependencies::
`````````````````
If your distribution ships an outdated version, you may recompile from
source. First install the dependencies::
sudo apt-get install python-matplotlib python-numpy python-pil python-scipy
or for Python 3::
sudo apt-get install python3-matplotlib python3-numpy python3-pil python3-scipy
Get compilers::
sudo apt-get install build-essential cython
Compile and install the latest stable version of scikit-image::
pip install scikit-image
Then run the pip installation command.
.. _universe repo: https://help.ubuntu.com/community/Repositories/Ubuntu
.. _Neurodebian repository: http://neuro.debian.net/
.. _Neurodebian instructions: http://neuro.debian.net/#how-to-use-this-repository
Running the development version
-------------------------------
Obtain the source from the git repository at
``http://github.com/scikit-image/scikit-image`` by running::
Other Unixes
------------
Install binary packages of cython, matplotlib, numpy, pillow and scipy if they
are available in your operating system's package manager. Make sure you have
a C and C++ compilers. Then install scikit-image with pip::
git clone https://github.com/scikit-image/scikit-image.git
pip install scikit-image
After unpacking, change into the source directory and execute:
pip install -e .
Upgrading
---------
You can upgrade scikit-image by::
To update::
pip install --upgrade --no-deps scikit-image
pip install scikit-image # installs new dependencies, if changed
git pull # Grab latest source
python setup.py build_ext -i # Compile any modified extensions
Building with bento
-------------------
```````````````````
``scikit-image`` can also be built using `bento
<http://cournape.github.io/Bento/>`__. Bento depends on `WAF
@@ -169,31 +114,9 @@ From the ``scikit-image`` source directory::
bentomaker configure
bentomaker build -j # (add -i for in-place build)
bentomaker install # (when not builing in-place)
bentomaker install # (when not building in-place)
Depending on file permissions, the install commands may need to be run as
sudo.
Install bleeding edge development version
-----------------------------------------
Obtain the source from the git-repository at
http://github.com/scikit-image/scikit-image by running::
git clone http://github.com/scikit-image/scikit-image
If you do not have git installed on your machine, you can also download a
zipball from https://github.com/scikit-image/scikit-image/zipball/master.
The scikit can be installed using::
pip install .
If you prefer, you can use a link instead by compiling extensions in-place::
python setup.py build_ext -i
pip install -e .
.. include:: ../../DEPENDS.txt