Installation¶
We strongly recommend using a virtual environment to manage dependencies and avoid package conflicts.
Requirements¶
- Python: 3.10 or higher
- Operating System: Windows, Linux, or macOS
- Dependencies: Automatically installed with pip (xarray, netCDF4, pandas, numpy, pint, AquaFetch, etc.)
For Users¶
Using uv (Recommended)¶
We recommend using uv for fast, reliable package and environment management:
1 2 3 4 5 | |
This installs the latest stable release along with all required dependencies, significantly faster than traditional pip.
Using pip (Alternative)¶
If you prefer traditional pip:
1 2 3 4 5 6 | |
Using conda¶
If you prefer conda, you can install from conda-forge:
1 2 3 4 5 6 | |
Verify Installation¶
After installation, verify it works:
1 | |
For Developers¶
If you want to contribute to hydrodataset or modify the source code, follow these steps:
Using uv (Recommended)¶
This project uses uv for fast, reliable package and environment management:
1 2 3 4 5 6 7 8 9 | |
The --all-extras flag installs:
- Base dependencies (required for core functionality)
- Development tools (pytest, black, flake8, etc.)
- Documentation tools (mkdocs, mkdocstrings, etc.)
Using pip (Alternative)¶
If you prefer traditional pip:
1 2 3 4 5 6 7 8 9 10 | |
Verify Development Installation¶
1 2 3 4 5 6 7 8 9 10 11 | |
Post-Installation Setup¶
Create Configuration File¶
After installation, create a hydro_setting.yml file in your home directory:
Windows: C:\Users\YourUsername\hydro_setting.yml
Linux/Mac: ~/hydro_setting.yml
Content:
1 2 3 4 | |
Important: Update the paths according to your system. Ensure: - Directories exist or will be created - You have write permissions - Sufficient disk space (cache files can be several GB)
Download Data¶
hydrodataset uses AquaFetch to fetch raw data. Some datasets download automatically, while others require manual download. Check the AquaFetch documentation for dataset-specific instructions.
Troubleshooting¶
pip installation fails¶
If you encounter errors during installation:
1 2 3 4 5 | |
Import errors after installation¶
1 2 3 4 5 6 | |
AquaFetch dependency issues¶
hydrodataset depends on the development version of AquaFetch. If you encounter issues:
1 2 | |
Configuration file not found¶
Error: FileNotFoundError: hydro_setting.yml not found
Solution: Ensure hydro_setting.yml is in your home directory:
1 2 3 4 5 6 7 | |
Upgrading¶
Upgrade to Latest Version¶
1 | |
Upgrade from conda¶
1 | |
Uninstallation¶
1 2 3 4 5 | |
Next Steps¶
After installation:
1. ✅ Create hydro_setting.yml configuration file
2. 📖 Read the Usage Guide
3. 🚀 Try the Quick Start examples
4. 📚 Browse the API Documentation
If you encounter issues, check the FAQ or open an issue on GitHub.
1 | |