Installs the Python library layer energyRt needs for the Pyomo backend. When
a conda/mamba executable is available (the recommended route) it creates or
reuses a named environment and installs pyomo, a solver (coincbc), and the
result-IO helpers from conda-forge. Otherwise it falls back to pip into the
configured Python (see set_python_path()); note that pip cannot supply the
CBC solver binary, which must then be installed separately.
This installs libraries only. It does not install Python or conda
themselves — see en_check_dependencies() for guidance on the system layer.
Usage
en_install_python_deps(
env = "energyRt",
packages = c("pyomo", "pandas", "pyarrow", "highspy"),
solver = "coincbc",
channel = "conda-forge",
use_conda = NULL
)Arguments
- env
character. Name of the conda environment to create/use.
- packages
character vector of Python packages to install.
- solver
character. Conda solver package to install (e.g.
"coincbc").- channel
character. Conda channel.
- use_conda
logical or NULL. Force conda (
TRUE) or pip (FALSE);NULLauto-detects (conda if found, else pip).
Value
NULL, invisibly. Verify with en_check_pyomo().
HiGHS version
highspy supplies HiGHS in-process and is the only Pyomo route to it;
SolverFactory("highs") resolves to a shell solver requiring a highs
executable. solver_options$pyomo_highs_barrier needs HiGHS >= 1.13: on
1.7.2 the solver = "ipm" option hangs before the solver starts and is not
interruptible by a time limit. Check the installed version with
en_check_pyomo().
