Verify installation and first use
Check the environment you installed into before opening a model. These checks need no input dataset and do not run a solve.
Verify the Python library
Section titled “Verify the Python library”Use the activated interpreter to print the installed distribution version:
python -c "from importlib.metadata import version; print(version('r2x-plexos'))"Expect a version string. Copy the console input below without prompts into
verify_installation.py:
>>> from r2x_plexos import PLEXOSConfig, PLEXOSParser, PLEXOSExporter>>> config = PLEXOSConfig(model_name="Base", horizon_year=2024)>>> assert (config.model_name, config.horizon_year) == ("Base", 2024)>>> assert PLEXOSParser.__name__ == "PLEXOSParser">>> assert PLEXOSExporter.__name__ == "PLEXOSExporter"Run it in the same environment:
python verify_installation.pySuccessful execution produces no output: all assertions pass.
This confirms that the public classes import and that basic configuration
validation works. It does not validate an external XML/JSON model or any profile data.
If an import fails, compare python -c "import sys; print(sys.executable)" with the
interpreter used for installation. See environment setup.
Verify CLI discovery
Section titled “Verify CLI discovery”r2x list r2x-plexosConfirm that plexos-parser and plexos-exporter are listed. Inspect the installed
parser’s generated options:
r2x run plexos-parser --helpYou should see --fpath, --model-name and --horizon-year
configuration options. Missing entry points usually indicate a different runtime
environment; follow plugin discovery troubleshooting.
Run the first model
Section titled “Run the first model”Continue with read, inspect, and export a model. That tutorial provides pinned data, a two-step pipeline, expected component counts, and a saved archive you can inspect. For application code, use Python contexts; for exact fields and lifecycle returns, use the API reference.