Installation¶
This guide covers all methods to install hydromodel on different platforms.
Requirements¶
- Python: 3.9 or higher
- Operating System: Windows, macOS, or Linux
- Disk Space: ~500 MB for package + data storage for datasets
Quick Installation¶
The fastest way to install hydromodel:
1 | |
This installs the latest stable release from PyPI.
Recommended Installation Methods¶
Method 1: Using pip (Standard)¶
For most users, pip is the recommended installation method:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Method 2: Using uv (Faster)¶
uv is a faster package manager:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Installation with uv is typically 10-100x faster than pip.
Method 3: Using conda¶
If you use conda/mamba:
1 2 3 4 5 6 7 8 9 10 11 | |
Installation from Source¶
For developers or to get the latest development version:
Option A: Direct from GitHub¶
1 | |
Option B: Clone and Install¶
1 2 3 4 5 6 7 8 9 | |
Option C: Using uv (Recommended for Developers)¶
1 2 3 4 5 6 7 8 9 10 11 12 | |
Optional Dependencies¶
For Data Access¶
1 2 | |
For Visualization¶
1 2 | |
For Development¶
1 2 | |
All Optional Dependencies¶
1 2 | |
Platform-Specific Instructions¶
Windows¶
- Install Python:
- Download from python.org
-
Check "Add Python to PATH" during installation
-
Install hydromodel:
1pip install hydromodel hydrodataset -
Verify installation:
1python -c "import hydromodel; print(hydromodel.__version__)"
macOS¶
-
Install Python (using Homebrew):
1brew install python@3.11 -
Install hydromodel:
1pip3 install hydromodel hydrodataset -
Verify installation:
1python3 -c "import hydromodel; print(hydromodel.__version__)"
Linux (Ubuntu/Debian)¶
-
Install Python:
1 2
sudo apt update sudo apt install python3 python3-pip python3-venv -
Install hydromodel:
1pip3 install hydromodel hydrodataset -
Verify installation:
1python3 -c "import hydromodel; print(hydromodel.__version__)"
Verifying Installation¶
After installation, verify everything works:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
Expected output:
1 2 3 4 | |
Configuration Setup¶
After installation, configure data paths:
Step 1: Create Configuration File¶
Create hydro_setting.yml in your home directory:
Windows: C:\Users\YourUsername\hydro_setting.yml
macOS/Linux: ~/hydro_setting.yml
1 2 3 4 | |
Step 2: Verify Configuration¶
1 2 3 4 5 | |
Troubleshooting¶
Common Issues¶
Issue 1: "No module named 'hydromodel'"¶
Solution: Make sure the virtual environment is activated:
1 2 3 4 5 | |
Issue 2: "Permission denied" during installation¶
Solution: Use --user flag or virtual environment:
1 | |
Issue 3: Dependency conflicts¶
Solution: Use a fresh virtual environment:
1 2 3 | |
Issue 4: Slow pip installation¶
Solution: Use uv for faster installation:
1 2 | |
Issue 5: "Microsoft Visual C++ required" (Windows)¶
Solution: Install Visual C++ Build Tools: - Download from visualstudio.microsoft.com - Or install via Anaconda which includes pre-compiled packages
Getting Help¶
If you encounter issues:
- Check documentation: Browse docs
- Search issues: GitHub Issues
- Ask questions: Open a new issue with:
- Your OS and Python version
- Full error message
- Installation command used
Updating hydromodel¶
Update to Latest Stable Version¶
1 | |
Update to Development Version¶
1 | |
Check Current Version¶
1 2 | |
Uninstallation¶
To remove hydromodel:
1 | |
To remove everything including dependencies:
1 2 3 4 5 | |
To remove the virtual environment:
1 2 3 4 5 6 | |
Docker Installation (Advanced)¶
For reproducible environments:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Build and run:
1 2 | |
Next Steps¶
After successful installation:
- Quick Start: Follow the Quick Start Guide
- Configuration: Set up data paths and settings
- Tutorial: Try the usage examples
- API Documentation: Browse the API reference
Support¶
- Documentation: https://OuyangWenyu.github.io/hydromodel
- Issues: https://github.com/OuyangWenyu/hydromodel/issues
- Discussions: https://github.com/OuyangWenyu/hydromodel/discussions