Installation¶
Prerequisites¶
The package requires Python 3.11 or higher. Install the package from PyPI:
pip install geo-sampling
Development Installation¶
For development, install with development dependencies:
git clone https://github.com/geosensing/geo-sampling.git
cd geo-sampling
uv sync --group dev
Pre-commit Hooks¶
To ensure code quality, install pre-commit hooks:
uv run pre-commit install
This will automatically run linting, formatting, and type checking before each commit. You can also run the hooks manually:
uv run pre-commit run --all-files
Verify Installation¶
Once installed, verify that the package works:
# Check CLI is available
geo-sampling --help
# Test Python import
python -c "import geo_sampling as gs; print(f'geo-sampling v{gs.__version__} ready!')"
Troubleshooting¶
Common Issues¶
Import Error for shapefile module
pip install pyshp
Network timeouts when downloading data
Check your internet connection
Some regions may have large datasets - try smaller administrative areas first
Permission errors on Windows
pip install --user geo-sampling
Development Setup¶
For contributors and advanced users:
# Clone the repository
git clone https://github.com/geosensing/geo-sampling.git
cd geo-sampling
# Install in development mode with all dependencies
uv sync --group dev --group test --group docs
# Run tests
uv run pytest
# Build documentation
cd docs
uv run make html
Next Steps¶
🚀 Try the Quick Start Guide
🔍 Explore detailed examples
📚 Browse the API reference