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
pip install openpls-engineInside a virtual environment is recommended:
python3 -m venv .venvsource .venv/bin/activatepip install openpls-enginePin a specific version
For reproducible analyses, pin the exact version you used in your paper or notebook:
pip install openpls-engine==1.12.0The runtime exposes the installed version as openpls.__version__, which is handy for methodology sections and bug reports.
Use from an AI assistant (MCP)
Since 1.12.0 the engine ships a local Model Context Protocol server, so an assistant like Claude or Cursor can inspect a dataset and fit a model by calling the engine on your machine. Nothing is uploaded; the tools read datasets from local file paths.
pip install "openpls-engine[mcp]"Point your MCP client at the openpls-mcp command, e.g. in Claude Desktop / Claude Code:
{ "mcpServers": { "openpls": { "command": "openpls-mcp" } }}It exposes two tools: describe_dataset(path) (row count and per-column name/type, so the assistant can pick indicator columns) and fit_pls_sem(data_path, latent_variables, structural_paths, scheme, scaled, missing_codes) (R² per construct, path coefficients with estimate / p-value / f², reliability with Cronbach’s alpha, rho_A, rho_C, AVE, model fit SRMR / d_ULS, and the goodness-of-fit index).
From source
If you need the bleeding edge or want to contribute:
git clone https://github.com/jojacobsen/openpls-engine.gitcd openpls-enginepython3 -m pip install -e .For development with the test suite and linter:
python3 -m venv .venvsource .venv/bin/activatepip install -r requirements-dev.txtpip install -e .
pytest # run the test suiteruff check . # lintVerify the install
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 Plspmimport openpls.config as cfrom openpls.scheme import Schemefrom openpls.mode import ModeMigrating 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 cfrom plspm.plspm import Plspmfrom plspm.scheme import Schemefrom plspm.mode import Modeimport openpls.config as cfrom openpls import Plspmfrom openpls.scheme import Schemefrom openpls.mode import ModePlspm 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.