We are assuming that you have default Python environment already configured on
your computer and you intend to install
scikit-image inside of it. If you
want to create and work with Python virtual environments, please follow the
instructions on venv and virtual environments.
There are two ways you can install
scikit-image on your preferred Python
1. Standard Installation:¶
On all other systems, install it via shell/command prompt:
pip install scikit-image
If you are running Anaconda or miniconda, use:
conda install -c conda-forge scikit-image
2. Development Installation:¶
You can install the
scikit-image development version if either your
distribution ships an outdated version or you want to develop and work on new
features before the package is released officially.
First, uninstall any existing installations:
pip uninstall scikit-image
or, on conda-based systems:
conda uninstall scikit-image
Now, clone scikit-image on your local computer, and install:
git clone https://github.com/scikit-image/scikit-image.git cd scikit-image pip install -e .
To update the installation:
git pull # Grab latest source pip install -e . # Reinstall
Platform-specific notes follow below.
If you experience the error
Error:unable to find vcvarsall.bat it means
that your computer does not have recommended compilers for Python. You can
either download and install Windows compilers from here or use
MinGW compilers . If using MinGW, make sure to correctly configure
distutils by modifying (or create, if not existing) the configuration file
distutils.cfg (located for example at
C:\Python26\Lib\distutils\distutils.cfg) to contain:
A run-through of the compilation process for Windows is included in our setup of Azure Pipelines (a continuous integration service).
b. Debian and Ubuntu¶
Install all the required dependencies:
sudo apt-get install python3-matplotlib python3-numpy python3-pil python3-scipy python3-tk
Install suitable compilers:
sudo apt-get install build-essential cython3
Complete the general development installation instructions above.
# Sphinx 1.7.8 has a bug when building on cached envs # https://github.com/sphinx-doc/sphinx/issues/5361 sphinx>=1.3,!=1.7.8 numpydoc>=0.9 sphinx-gallery sphinx-copybutton pytest-runner scikit-learn matplotlib>=3.0.1 dask[array]>=0.9.0 # cloudpickle is necessary to provide the 'processes' scheduler for dask cloudpickle>=0.2.1
numpy>=1.13.3 scipy>=0.19.0 matplotlib>=2.0.0,!=3.0.0 networkx>=2.0 pillow>=4.3.0 imageio>=2.3.0 PyWavelets>=0.4.0
You can use
scikit-image with the basic requirements listed above, but some
functionality is only available with the following installed:
pyamgmodule is used for the fast cg_mg mode of random walker segmentation.
Provides FITS I/O capability.
# pytest 3.7.3 is broken on macOS, see: # https://github.com/pytest-dev/pytest/issues/3888 pytest!=3.7.3 pytest-cov pytest-localserver flake8 codecov
Warnings during testing phase¶
Scikit-image tries to catch all warnings in its development builds to ensure
that crucial warnings from dependencies are not missed. This might cause
certain tests to fail if you are building scikit-image with versions of
dependencies that were not tested at the time of the release. To disable
failures on warnings, export the environment variable
SKIMAGE_TEST_STRICT_WARNINGS with a value of 0 or False and run the
export SKIMAGE_TEST_STRICT_WARNINGS=False pytest --pyargs skimage