Skip to content

Installation

Installation

  1. Install the package

    Terminal window
    pip install epftoolbox2
  2. Verify installation

    import epftoolbox2
    epftoolbox2.verify()
  3. Configure for parallel processing (optional but recommended)

    See the section below for GIL-free Python setup.


Requirements

  • Python 3.10+ (Python 3.14t recommended for parallel processing)
  • pandas, numpy, scikit-learn
  • requests (for API sources)
  • openpyxl (for Excel export)
  • rich (for terminal output)

GIL-Free Python & Multithreading Python 3.13t+

For parallel model training on multi-core systems, use Python 3.14t (free-threading build) which removes the Global Interpreter Lock (GIL).

Installing Python 3.14t

Terminal window
uv python install 3.14t
uv venv --python 3.14t

Complete Setup

  1. Set environment variables before running Python

    Terminal window
    $env:PYTHON_GIL=0; python your_script.py
  2. Configure threading in your script (optional)

    import os
    # Set number of parallel threads (adjust to your CPU cores)
    os.environ["MAX_THREADS"] = "16"
    # Prevent nested threading from NumPy/BLAS libraries
    os.environ["OMP_NUM_THREADS"] = "1"
    os.environ["MKL_NUM_THREADS"] = "1"
    os.environ["OPENBLAS_NUM_THREADS"] = "1"
  3. Import the library

    from epftoolbox2.pipelines import DataPipeline, ModelPipeline
    from epftoolbox2.models import OLSModel, LassoCVModel