Installation¶
Sentinelsat depends on homura, which
depends on PycURL. When the dependencies are
fulfilled install with pip install sentinelsat
.
Unix¶
Ubuntu¶
sudo apt-get install build-essential libcurl4-openssl-dev python-dev python-pip
Fedora¶
sudo yum groupinstall "Development Tools"
sudo yum install libcurl libcurl-devel python-devel python-pip
Windows¶
The easiest way to install pycurl is with pycurl wheels provided by Christoph Gohlke
pip install pycurl.whl
or with Conda.
conda install pycurl
OSX¶
TODO: How to install on OSX.
Tests¶
git clone https://github.com/sentinelsat/sentinelsat.git
cd sentinelsat
pip install -e .[test]
export SENTINEL_USER=<your scihub username>
export SENTINEL_PASSWORD=<your scihub password>
py.test -v -m "not homura"
Running all tests, including tests for downloading functionality, requires SciHub credentials to be provided via environment variables.
export SENTINEL_USER=<your scihub username>
export SENTINEL_PASSWORD=<your scihub password>
py.test -v
Supported Python versions¶
Sentinelsat has been tested with Python versions 2.7 and 3.4+. Earlier Python 3 versions are expected to work as well as long as the dependencies are fulfilled.
Optional dependencies¶
The convenience functions to_dataframe()
and to_geodataframe()
require pandas
and/or
geopandas
to be present.
Troubleshooting¶
The download from SciHub will fail if the server certificate cannot be verified
because no default CA bundle is defined, as on Windows, or when the CA bundle is
outdated. In most cases the easiest solution is to install or update certifi
:
pip install -U certifi
You can also override the the path setting to the PEM file of the CA bundle
using the pass_through_opts
keyword argument when calling api.download()
or api.download_all()
:
from pycurl import CAINFO
api.download_all(products, pass_through_opts={CAINFO: 'path/to/my/cacert.pem'})