Installation¶
If you don’t have pip installed, this Python installation guide can guide you through the process.
Stable release¶
To install xsdba, run this command in your terminal:
python -m pip install xsdba
This is the preferred method to install xsdba, as it will always install the most recent stable release.
From sources¶
The sources for xsdba can be downloaded from the Github repo.
Download the source code from the Github repo using one of the following methods:
Clone the public repository:
git clone git@github.com:Ouranosinc/xsdba.git
Download the tarball:
curl -OJL https://github.com/Ouranosinc/xsdba/tarball/main
Once you have a copy of the source, you can install it with:
python -m pip install .
When new changes are made to the Github repo, if using a clone, you can update your local copy using the following commands from the root of the repository:
git fetch git checkout main git pull origin main python -m pip install .
These commands should work most of the time, but if big changes are made to the repository, you might need to remove the environment and create it again.
Extra Dependencies¶
xsdba has a few optional dependencies that can be installed using the following commands:
For supporting additional methods and optional functionality:
python -m pip install "xsdba[extras]"
To install all optional dependencies (development, documentation, and extras):
python -m pip install "xsdba[all]"
Experimental SDBA Algorithms¶
xsdba also offers support for a handful of experimental adjustment methods to extend, available only if some additional libraries are installed. These libraries are completely optional.
One experimental library is SBCK. SBCK is available from PyPI but has one complex dependency: Eigen3. As SBCK is compiled at installation time, a C++ compiler (GCC, Clang, MSVC, etc.) must also be available.
On Debian/Ubuntu, Eigen3 can be installed via apt:
$ sudo apt-get install libeigen3-dev
Eigen3 is also available on conda-forge, so, if already using Anaconda, one can do:
$ conda install -c conda-forge eigen
Afterwards, SBCK can be installed from PyPI using pip:
$ python -m pip install pybind11 # must be installed before SBCK
$ python -m pip install SBCK