Skip to content

Installation Guide

Requirements

  • Python >= 3.11
  • PyTorch >= 2.6.0
  • CUDA (optional, for GPU acceleration)

Stable Release

The recommended way to install the latest stable version is using pip:

1
pip install torchhydro

If you don't have pip installed, you can follow this Python installation guide.

Development Version

For the latest development version, you can install directly from the GitHub repository:

1
2
3
git clone https://github.com/OuyangWenyu/torchhydro.git
cd torchhydro
pip install -e .

Optional Dependencies

For specific functionality, you might need to install the following optional dependencies:

1
2
3
4
5
6
7
8
# For data visualization
pip install matplotlib seaborn

# For data processing
pip install pandas numpy

# For geographic data processing
pip install geopandas rasterio

Verify Installation

After installation, you can verify it by running the following code in your Python environment:

1
2
import torchhydro
print(torchhydro.__version__)