Thursday, 9 May 2019

Installation guide for Anaconda, Python, OpenCV and fmask for interpreting Sentinel Images

Download and Install Anaconda v. (or newer) for Python 2.7, available at: During installation, make sure you tick:
- "Register Anaconda as my default Python 2.7" Install GDAL_2.2.0 (or newer) from Administrator Anaconda Prompt as follow:
:$ conda install -c conda-forge gdal=2.2.0
:$ conda install -c conda-forge gdal
But if you use the second option, please check which version of gdal was actually installed and whether it supports jp2 (Sentinel 2) images or not.

Install Jypiter Notebook:
:$ conda install -c conda-forge jupyterlab
Run JypiterLab:
:$ jupyter-lab

Install opencv:
:$ conda install -c menpo opencv
You may need to run the above command using an Administrator Command Prompt

For reading .nc images of Sentinel 3:
:$ conda install -c conda-forge netcdf4

Install fmask from Administrator Command Prompt as follow:
:$ conda config --add channels conda-forge
:$ conda create -n myenv python-fmask
:$ activate myenv

Other dependencies:
:$ conda install -c anaconda scipy
:$ conda install -c anaconda numpy
:$ conda install -c conda-forge matplotlib
:$ conda install scikit-learn

For Doxygen Documentation please install it from here:

Every time you run your scripts, you need to run Anaconda Prompt as an Administrator and run "activate myenv".

Once you activate myenv, check they version of python that you are using. There is a bug in recent anaconda versions and when myenv is activated, your python is automatically updated to 3.6. You may use the following command to downgrade it:
:$ conda install python=2.7.8
Please note that this may be risky, since other applications may depend on Python 3.6.


This is part of the H2020 Research Innovation and Staff Exchange project SEO-DWARF with reg. no MSCA-RISE-691071. Website:

No comments:

Post a Comment