Installation Guide¶
ONAD supports Python 3.10+ and can be installed via pip. This guide covers various installation options and requirements.
Prerequisites¶
- Python: 3.10 or higher
- Operating System: Windows, macOS, Linux
- Memory: At least 512 MB RAM (more for larger datasets)
Basic Installation¶
The simplest way to install ONAD is using pip:
This installs the core package with essential dependencies:
numpy>=2.2.3
- Numerical computingfaiss-cpu>=1.10.0
- Similarity search enginetqdm>=4.67.1
- Progress barsscipy>=1.15.2
- Scientific computing
Installation Options¶
ONAD provides several optional dependency groups for different use cases:
Evaluation Tools¶
For model evaluation and benchmarking:
Includes:
- scikit-learn
- Machine learning utilities and metrics
Deep Learning Support¶
For neural network-based models:
Includes:
- torch
- PyTorch deep learning framework
Benchmarking Tools¶
For comparing with other streaming libraries:
Includes:
- river
- Online machine learning library
Development Tools¶
For contributing to ONAD:
Includes:
- ruff
- Fast Python linter and formatter
- pre-commit
- Git hooks for code quality
- pytest
- Testing framework
- pytest-cov
- Coverage reporting
- mypy
- Static type checking
Documentation Tools¶
For building documentation:
Includes:
- mkdocs
- Documentation generator
- mkdocs-material
- Material theme for MkDocs
- mkdocstrings
- API documentation from docstrings
Complete Installation¶
To install all optional dependencies:
Virtual Environment Setup¶
We recommend using a virtual environment to avoid dependency conflicts:
Development Installation¶
If you want to contribute to ONAD or use the latest development version:
The -e
flag installs in "editable" mode, so changes to the code take effect immediately.
Verify Installation¶
Test your installation:
import onad
print(f"ONAD version: {onad.__version__}")
# Test a simple model
from onad.model.iforest import OnlineIsolationForest
model = OnlineIsolationForest()
print("✅ Installation successful!")
Common Issues¶
ImportError: No module named 'faiss'¶
Problem: FAISS is not installed or incompatible with your system.
Solution:
# Try installing FAISS separately
pip install faiss-cpu
# Or for GPU support (if available)
pip install faiss-gpu
Memory Issues with Large Datasets¶
Problem: Out of memory errors when processing large streams.
Solution: Configure memory limits in your models:
Type Checking Errors¶
Problem: MyPy reports type errors in your code.
Solution: Ensure you're using Python 3.10+ and install type stubs:
System Requirements¶
Minimum Requirements¶
- CPU: Any modern processor
- RAM: 512 MB
- Disk: 100 MB free space
- Python: 3.10+
Recommended Requirements¶
- CPU: Multi-core processor for parallel processing
- RAM: 2+ GB for large-scale streaming
- Disk: 1+ GB for datasets and models
- Python: 3.11+ for better performance
Next Steps¶
After installation:
- Quick Start: Get started with your first anomaly detection model
- User Guide: Learn about ONAD's features in detail
- Examples: Explore real-world use cases
Need Help?
If you encounter installation issues, please:
- Check the troubleshooting section
- Search existing issues
- Create a new issue with your system details