Installation¶
Requirements¶
- Python 3.10 or higher
- pip or uv package manager
Basic Installation¶
Using pip¶
Using uv (Recommended)¶
uv is a fast Python package installer and resolver:
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install ondine
uv pip install ondine
Optional Dependencies¶
Ondine provides optional dependency groups for specific features:
MLX (Apple Silicon Local Inference)¶
For running models locally on Apple Silicon (M1/M2/M3/M4) with MLX:
Requirements: - macOS with Apple Silicon (M1/M2/M3/M4) - 16GB+ RAM recommended
Supported models: - Qwen-2.5 series - Llama models - Mistral models - Any MLX-compatible model from Hugging Face
Observability¶
For OpenTelemetry-based observability and tracing:
Features: - Distributed tracing with Jaeger - Custom metrics export - Performance monitoring
Development Tools¶
For contributing or development:
Includes: - pytest and test utilities - ruff for linting - mypy for type checking - pre-commit hooks - Security scanners (bandit, pip-audit)
Install All Optional Dependencies¶
Verify Installation¶
Check that Ondine is installed correctly:
Or use the CLI:
API Keys Setup¶
Ondine requires API keys for LLM providers. Set them as environment variables:
OpenAI¶
Azure OpenAI¶
export AZURE_OPENAI_API_KEY="..."
export AZURE_OPENAI_ENDPOINT="https://..."
export AZURE_OPENAI_API_VERSION="2024-02-15-preview"
Anthropic Claude¶
Groq¶
Environment File¶
For convenience, create a .env file in your project root:
Ondine automatically loads .env files using python-dotenv.
Upgrade¶
To upgrade to the latest version:
Troubleshooting¶
Import Error: No module named 'ondine'¶
Make sure you're in the correct Python environment:
MLX Installation Issues¶
MLX only works on Apple Silicon. If you get import errors:
- Verify you're on Apple Silicon:
uname -mshould showarm64 - Install Xcode Command Line Tools:
xcode-select --install - Try reinstalling:
pip uninstall mlx mlx-lm && pip install ondine[mlx]
API Key Not Found¶
If you get authentication errors:
- Check environment variables:
echo $OPENAI_API_KEY - Verify
.envfile is in the correct directory - Restart your Python session after setting environment variables
Next Steps¶
- Quickstart Guide - Build your first pipeline
- Core Concepts - Understand the architecture
- Provider Configuration - Configure LLM providers