Getting started

Installation

Requirements

  • Python 3.10, 3.11, 3.12, or 3.13. Older Python versions are not supported.
  • Core dependencies are installed automatically: pandas >= 1.5, numpy >= 1.23, scipy >= 1.10, statsmodels >= 0.14, scikit-learn >= 1.2.

From PyPI

Terminal window
pip install openpls-engine

Inside a virtual environment is recommended:

Terminal window
python3 -m venv .venv
source .venv/bin/activate
pip install openpls-engine

Pin a specific version

For reproducible analyses, pin the exact version you used in your paper or notebook:

Terminal window
pip install openpls-engine==1.5.0

The runtime exposes the installed version as openpls.__version__, which is handy for methodology sections and bug reports.

From source

If you need the bleeding edge or want to contribute:

Terminal window
git clone https://github.com/jojacobsen/openpls-engine.git
cd openpls-engine
python3 -m pip install -e .

For development with the test suite and linter:

Terminal window
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
pip install -e .
pytest # run the test suite
ruff check . # lint

Verify the install

Terminal window
python -c "import openpls; print(openpls.__version__)"

You should see the version number you installed (for example 1.0.2).

A note on the import name

The PyPI distribution is named openpls-engine, and the Python package you import is named openpls:

from openpls import Plspm
import openpls.config as c
from openpls.scheme import Scheme
from openpls.mode import Mode

Migrating from 0.7.x

1.0.0 renamed the import namespace from plspm to openpls. The PyPI distribution name (openpls-engine) is unchanged. To upgrade existing notebooks and scripts:

import plspm.config as c
from plspm.plspm import Plspm
from plspm.scheme import Scheme
from plspm.mode import Mode
import openpls.config as c
from openpls import Plspm
from openpls.scheme import Scheme
from openpls.mode import Mode

Plspm is now re-exported at the top level, so from openpls import Plspm is the recommended entry point.

1.0.0 also aligns indicator standardization with SmartPLS 4: each indicator is now standardized with its own (Bessel-corrected) sample standard deviation instead of a pooled block standard deviation. Loadings, R², HTMT, f² and Q² are scale-invariant and therefore unaffected; outer weights and composite scores now match the SmartPLS convention for mixed-scale models. See the changelog for the full list.