Skip to contents

This function is intended for advanced use only. Normal users do not need to call it — the pipeline resolves its Python environment automatically via basilisk.

Usage

grayleafspot_python_executable(python = NULL, engine_model = "localunet")

Arguments

python

Optional character. Path to a Python executable.

engine_model

Character. Reserved for future use; currently only "localunet" is supported.

Value

Character string: absolute path to the resolved Python executable.

Details

Resolves the Python interpreter in this priority order: the python argument, the GRAYLEAFSPOTR_PYTHON environment variable, the grayleafspotr.python option, and finally python3 / python from PATH.

Examples

tryCatch(
  grayleafspot_python_executable(),
  error = function(e) message("Python not found: ", conditionMessage(e))
)
#> [1] "/home/runner/.cache/R/basilisk/1.24.0/grayleafspotr/0.99.2/grayleafspotr_env_v1/bin/python3"