Installation¶
This guide will help you install UPIR on your system.
Prerequisites¶
Required¶
- Python 3.11+ - UPIR requires Python 3.11 or later
- pip - Python package installer
Recommended¶
- Virtual environment - Keep UPIR isolated from other projects
- Git - For installing from source
Installation Methods¶
From PyPI (Recommended)¶
Install the latest stable release:
From Source¶
For the latest development version:
Optional Dependencies¶
UPIR has several optional dependency groups:
Google Cloud Platform Integration¶
For GCP-specific components (BigQuery, Pub/Sub, Cloud Storage):
Development Tools¶
For contributing to UPIR (testing, linting, formatting):
Documentation¶
For building documentation:
All Optional Dependencies¶
Install everything:
Core Dependencies¶
UPIR automatically installs these core dependencies:
- z3-solver (≥4.12.2) - SMT solving for formal verification
- numpy (≥1.24.3, <2.0.0) - Numerical computing for RL
- scikit-learn (≥1.3.0, <2.0.0) - Clustering for pattern extraction
Verify Installation¶
After installation, verify UPIR is working:
Test core functionality:
from upir import UPIR, FormalSpecification, TemporalProperty, TemporalOperator
# Create a simple temporal property
prop = TemporalProperty(
operator=TemporalOperator.ALWAYS,
predicate="test_predicate"
)
print(f"✓ UPIR installed successfully!")
Troubleshooting¶
Python Version Issues¶
If you get version errors, check your Python version:
If you have multiple Python versions, use:
Z3 Solver Issues¶
If Z3 installation fails, try installing it separately:
Permission Errors¶
On Linux/macOS, you might need:
Or use a virtual environment (recommended):
Next Steps¶
Once installed, proceed to:
- Quick Start Guide - Your first UPIR program
- Core Concepts - Understand key ideas
- Examples - Real-world use cases