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.

minimal install

conda install -c conda-forge rasterio 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/oarcher/xsar.git

for development installation

git clone https://github.com/oarcher/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/oarcher/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 gdal cartopy dask[array]