Installation
Installation
-
Install the package
Terminal window pip install epftoolbox2Terminal window uv add epftoolbox2Terminal window git clone https://github.com/dawidlinek/epftoolbox2.gitcd epftoolbox2pip install -e . -
Verify installation
import epftoolbox2epftoolbox2.verify() -
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
uv python install 3.14tuv venv --python 3.14tpyenv install 3.14.0tpyenv local 3.14.0tComplete Setup
-
Set environment variables before running Python
Terminal window $env:PYTHON_GIL=0; python your_script.pyTerminal window set PYTHON_GIL=0 && python your_script.pyTerminal window PYTHON_GIL=0 python your_script.pyTerminal window python -Xgil=0 your_script.py -
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 librariesos.environ["OMP_NUM_THREADS"] = "1"os.environ["MKL_NUM_THREADS"] = "1"os.environ["OPENBLAS_NUM_THREADS"] = "1" -
Import the library
from epftoolbox2.pipelines import DataPipeline, ModelPipelinefrom epftoolbox2.models import OLSModel, LassoCVModel