Installation¶
Stable release¶
To install xdatasets, run this command in your terminal:
python -m pip install xdatasets
This is the preferred method to install xdatasets, as it will always install the most recent stable release.
If you don’t have pip installed, this Python installation guide can guide you through the process.
From sources¶
The sources for Xdatasets 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:hydrologie/xdatasets.git
Download the tarball:
curl -OJL https://github.com/hydrologie/xdatasets/tarball/main
Once you have a copy of the source, you can install it with:
python -m pip install .
conda env create -f environment-dev.yml conda activate xdatasets make dev
If you are on Windows, replace the
make dev
command with the following:python -m pip install -e .[dev]
Even if you do not intend to contribute to xdatasets, we favor using environment-dev.yml over environment.yml because it includes additional packages that are used to run all the examples provided in the documentation. If for some reason you wish to install the PyPI version of xdatasets into an existing Anaconda environment (not recommended if requirements are not met), only run the last command above.
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.