Installation

xsar relies on gdal and other shared libs, that are not provided by pip. So insallation in a conda environement is recommended.

conda setup

First, create and activate a conda environment:

conda create -n xsar
conda activate xsar

You can either install recommended packages or minimal packages.

Note

for macOS with python<3.9 you must install tbb package with conda install

Note

for windows you must install fiona package with conda install

minimal install

conda install -c conda-forge rasterio">=1.2.6" gdal cartopy dask[array]

Install xsar

Once conda environment is created and activated, xsar can be installed by pip for a normal user, or with git clone for a developper.

As a normal user

pip install git+https://github.com/umr-lops/xsar.git

for development installation

git clone https://github.com/umr-lops/xsar
cd xsar
# this is needed to register git filters
git config --local include.path ../.gitconfig
pip install -e .
pip install -r requirements.txt

Note

While you are here, why not install also xsarsea ?

pip install git+https://gitlab.ifremer.fr/sarlib/xsarsea.git

Update xsar

To update xsar installation, just rerun pip install, in your already activated conda environment.

pip install git+https://github.com/umr-lops/xsar.git

Note

if you have some problems after updating xsar, you might have to update also your conda environment:

conda install -c conda-forge rasterio">=1.2.6" gdal cartopy dask[array]