Installation Guide
This guide covers all installation methods for the SPE9 Geomodeling Toolkit.
📦 Installation Methods
Method 1: PyPI Installation (Recommended)
Basic Installation
For traditional Gaussian Process models only:
Advanced Installation
For Deep GP models with GPyTorch support:
Complete Installation
For all features including geospatial tools:
Method 2: Development Installation
For contributors and developers:
git clone https://github.com/yourusername/spe9-geomodeling.git
cd spe9-geomodeling
pip install -e ".[dev]"
Method 3: From Source
🔧 Optional Dependencies
The toolkit uses modular dependencies to keep the base installation lightweight:
Core Dependencies (Always Installed)
numpy >= 1.24.0- Numerical computingpandas >= 1.5.0- Data manipulationscikit-learn >= 1.3.0- Machine learningmatplotlib >= 3.7.0- Basic plottingsignalplot >= 0.1.0- Minimalist visualizationpykrige >= 1.6.0- Kriging algorithms
Advanced Dependencies
Install with pip install spe9-geomodeling[advanced]:
torch >= 2.0.0- Deep learning frameworkgpytorch >= 1.11.0- Gaussian Process librarybotorch >= 0.9.0- Bayesian optimizationoptuna >= 3.3.0- Hyperparameter optimization
Geospatial Dependencies
Install with pip install spe9-geomodeling[geospatial]:
rasterio >= 1.3.0- Raster data I/Ogeopandas >= 0.13.0- Geospatial data analysisshapely >= 2.0.0- Geometric operationsxarray >= 2023.1.0- N-dimensional arrays
Visualization Dependencies
Install with pip install spe9-geomodeling[visualization]:
plotly >= 5.15.0- Interactive plotsipywidgets >= 8.0.0- Jupyter widgets
Development Dependencies
Install with pip install spe9-geomodeling[dev]:
pytest >= 7.4.0- Testing frameworkblack >= 23.0.0- Code formattingjupyter >= 1.0.0- Notebook environment
🖥️ System Requirements
Minimum Requirements
- Python: 3.9 or higher
- RAM: 4GB
- Storage: 1GB free space
- OS: Windows 10, macOS 10.15, or Linux
Recommended Requirements
- Python: 3.11 or higher
- RAM: 8GB or more
- Storage: 5GB free space
- GPU: CUDA-compatible GPU for Deep GP models (optional)
🔍 Verification
After installation, verify everything works:
# Test basic installation
import spe9_geomodeling
print(f"SPE9 Toolkit version: {spe9_geomodeling.__version__}")
# Test core functionality
from spe9_geomodeling import UnifiedSPE9Toolkit
toolkit = UnifiedSPE9Toolkit()
print("✅ Core functionality available")
# Test advanced features (if installed)
try:
from spe9_geomodeling import DeepGPExperiment
print("✅ Advanced Deep GP features available")
except ImportError:
print("ℹ️ Advanced features not installed (install with [advanced])")
🐛 Troubleshooting
Common Issues
Issue: ImportError for GPyTorch
Solution: Install advanced dependencies:
Issue: CUDA/GPU Issues
Solution: Use CPU-only mode or reduce batch size:
import torch
torch.cuda.is_available() # Check if CUDA is available
# Force CPU usage if needed
device = torch.device('cpu')
Issue: File Not Found for SPE9 Data
Solution: Ensure SPE9 dataset is available or provide correct path:
Environment-Specific Issues
Conda Environments
If using conda, create a dedicated environment:
Apple Silicon (M1/M2) Macs
For optimal performance:
# Install with Apple Silicon optimized PyTorch
pip install spe9-geomodeling[advanced] --extra-index-url https://download.pytorch.org/whl/cpu
Windows with CUDA
For GPU acceleration on Windows:
# Install CUDA-enabled PyTorch first
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install spe9-geomodeling[advanced]
📊 Performance Testing
Test your installation performance:
from spe9_geomodeling import DeepGPExperiment
import time
# Quick performance test
start_time = time.time()
experiment = DeepGPExperiment()
# This will use synthetic data if SPE9 is not available
results = experiment.run_comparison_experiment()
elapsed = time.time() - start_time
print(f"Performance test completed in {elapsed:.1f} seconds")
print(f"Best model R²: {max(r['metrics']['r2_score'] for r in results.values()):.3f}")
🔄 Updating
To update to the latest version:
To update with all dependencies:
🗑️ Uninstallation
To completely remove the toolkit:
Next Steps: Once installed, check out the Quick Start Tutorial to begin using the toolkit!