Installation#

OpenSTEF 4.0 is designed with a modular architecture that allows you to install only the components you need. The library consists of several packages that can be installed independently or together.

System Requirements#

  • Python 3.12 or higher (Python 3.13 supported)

  • 64-bit operating system (Windows, macOS, or Linux)

Note

OpenSTEF 4.0 requires Python 3.12+ for optimal performance and modern type safety features. If you need Python 3.10/3.11 support, consider using OpenSTEF 3.x.

Package Overview#

OpenSTEF 4.0 follows a modular design with specialized packages:

Quick Installation#

For most users, start with the meta-package:

pip install openstef
uv add openstef
conda install -c conda-forge openstef
pixi add openstef

This installs openstef meta-package by default, which provides the core functionality including openstef-core and openstef-models.

Installation Options#

Choose Your Installation#

OpenSTEF’s modular design allows you to install exactly what you need:

Complete Installation (Recommended for most users):

pip install "openstef[all]"
uv add "openstef[all]"

This installs all available packages: openstef-models and openstef-beam.

Individual Package Installation:

Install only the packages you need:

# Core utilities and datasets only
pip install openstef-core

# Core forecasting models only
pip install openstef-models

# Backtesting and evaluation tools only
pip install openstef-beam

# Meta-package with models (default)
pip install openstef
# Core utilities and datasets only
uv add openstef-core

# Core forecasting models only
uv add openstef-models

# Backtesting and evaluation tools only
uv add openstef-beam

# Meta-package with models (default)
uv add openstef

Selective Installation with Extras:

Mix and match components using the meta-package:

# Models + BEAM
pip install "openstef[beam]"

# Models + Foundational models (when available)
pip install "openstef[foundational-models]"

# Multiple extras
pip install "openstef[beam,foundational-models]"
# Models + BEAM
uv add "openstef[beam]"

# Models + Foundational models (when available)
uv add "openstef[foundational-models]"

# Multiple extras
uv add "openstef[beam,foundational-models]"

Use Case Examples:

Installation by Use Case#

Use Case

Installation Command

What You Get

Research & Experimentation

pip install "openstef[all]"

Full toolkit for analysis

Production Forecasting

pip install openstef-models

Lightweight core models

Model Evaluation

pip install "openstef[beam]"

Models + evaluation tools

Basic Development

pip install openstef

Core functionality

Development Installation#

For contributors and advanced users who want to modify the source code:

Prerequisites#

  • uv (recommended) or pip

  • Git

Clone and Install#

# Clone the repository
git clone https://github.com/OpenSTEF/openstef.git
cd openstef

# Install in development mode with all dependencies
uv sync --all-extras --dev

# Verify installation
uv run pytest

This installs:

  • All OpenSTEF packages in editable mode

  • Development tools (linting, testing, documentation)

  • Pre-commit hooks for code quality

Package-Specific Development#

To work on individual packages:

# Install specific package in development mode
cd packages/openstef-models
uv pip install -e .

# Or install with development dependencies
uv sync --dev

Verification#

Verify your installation:

import openstef_models
print(f"OpenSTEF Models version: {openstef_models.__version__}")

# If you installed openstef-beam
try:
    import openstef_beam
    print(f"OpenSTEF BEAM version: {openstef_beam.__version__}")
except ImportError:
    print("OpenSTEF BEAM not installed")

Troubleshooting#

Common Issues#

Python Version Error

If you see a Python version error:

ERROR: Package 'openstef' requires a different Python: 3.11.0 not in '>=3.12,<4.0'

Upgrade to Python 3.12 or higher. We recommend using pyenv or conda to manage Python versions.

Package Not Found

If conda cannot find the package:

# Add conda-forge channel
conda config --add channels conda-forge
conda install openstef

Import Errors

If you encounter import errors, ensure you’re using the correct package names:

# Correct imports
from openstef_models import forecasting
from openstef_beam import evaluation

# Not: from openstef.models import forecasting

Memory Issues

For large datasets, consider:

  • Installing packages with specific memory optimizations

  • Using data streaming approaches

  • Configuring appropriate chunk sizes

Getting Help#

If you encounter issues:

  1. Check the GitHub Issues

  2. Review the Contribute guide

  3. Visit our Support page for community resources

  4. Contact us at openstef@lfenergy.org

Platform-Specific Notes#

Windows#

  • Use PowerShell or Command Prompt

  • Consider using Windows Subsystem for Linux (WSL) for best compatibility

  • Some scientific packages may require Microsoft Visual C++ Build Tools

macOS#

  • Most installations work out of the box

  • For Apple Silicon (M1/M2), ensure you’re using compatible wheel distributions

Linux#

  • Most distributions work out of the box

  • For Ubuntu/Debian: sudo apt-get install python3-dev

  • For RHEL/CentOS: sudo yum install python3-devel

Next Steps#

After installation:

  1. Read the Quick Start guide

  2. Explore Tutorials for hands-on examples

  3. Check the API Reference for detailed documentation

  4. Review Intro to Energy Forecasting to understand OpenSTEF’s capabilities

Staying Updated#

OpenSTEF follows semantic versioning. To stay updated with the latest releases:

# Check current version
pip show openstef

# Upgrade to latest version
pip install --upgrade openstef
# Check current version
uv list | grep openstef

# Upgrade to latest version
uv upgrade openstef
# Check current version
conda list openstef

# Upgrade to latest version
conda update openstef
# Check current version
pixi list | grep openstef

# Upgrade to latest version
pixi upgrade openstef

Subscribe to our GitHub releases for notifications about new versions and features.