Installation Guide¶
This guide covers different ways to install pyGWRetrieval.
Requirements¶
- Python 3.8 or higher
- pip package manager
Quick Installation¶
The simplest way to install pyGWRetrieval is using pip:
Installation from Source¶
To install the latest development version from source:
# Clone the repository
git clone https://github.com/montimaj/pyGWRetrieval.git
# Navigate to the directory
cd pyGWRetrieval
# Install in development mode
pip install -e .
Optional Dependencies¶
pyGWRetrieval has several optional dependency groups that can be installed based on your needs:
Visualization Extras¶
For enhanced visualization capabilities including seaborn and basemaps:
This includes:
- seaborn - Statistical data visualization
- contextily - Basemaps for spatial plots
Development Dependencies¶
For development and testing:
This includes:
- pytest - Testing framework
- pytest-cov - Coverage reporting
- black - Code formatting
- flake8 - Linting
- mypy - Type checking
- isort - Import sorting
Documentation Dependencies¶
For building documentation:
This includes:
- sphinx - Documentation generator
- sphinx-rtd-theme - Read the Docs theme
- myst-parser - Markdown support
- sphinx-autodoc-typehints - Type hint documentation
All Dependencies¶
To install all optional dependencies:
Verifying Installation¶
After installation, verify it works correctly:
You can also run a quick test:
from pyGWRetrieval import GroundwaterRetrieval
# This should not raise any errors
gw = GroundwaterRetrieval()
print("Installation successful!")
Troubleshooting¶
Common Issues¶
GDAL/GEOS Installation Issues¶
If you encounter issues installing geopandas or shapely, you may need to install system dependencies:
macOS:
Ubuntu/Debian:
Windows: Consider using conda for easier installation:
pgeocode Data Download¶
The pgeocode package downloads postal code data on first use. If you're behind a firewall, you may need to configure proxy settings.
Getting Help¶
If you encounter issues:
- Check the GitHub Issues
- Ensure all dependencies are correctly installed
- Try creating a fresh virtual environment
Virtual Environment Setup (Recommended)¶
It's recommended to use a virtual environment:
# Create virtual environment
python -m venv pygw_env
# Activate (macOS/Linux)
source pygw_env/bin/activate
# Activate (Windows)
pygw_env\Scripts\activate
# Install package
pip install pyGWRetrieval
Conda Installation¶
If you prefer conda: