One may use the RETICULATE_PYTHON environment to tell reticulate where to look for python. And in fact sessioninfo::python_info() (and hence sessioninfo::session_info(info = "python")) are quite aware of this (by calling reticulate::py_config()) , but only if isNamespaceLoaded("reticulate") && reticulate::py_available(initialize = FALSE) is already TRUE.
Perhaps that is desirable (because we don't want sessioninfo::python_info() to have side-effects), but maybe instead of saying "Python is not available" perhaps sessioninfo::python_info() could say "Python is not available (or reticulate::py_config has not been called yet)" ?
One may use the
RETICULATE_PYTHONenvironment to tellreticulatewhere to look forpython. And in factsessioninfo::python_info()(and hencesessioninfo::session_info(info = "python")) are quite aware of this (by callingreticulate::py_config()) , but only ifisNamespaceLoaded("reticulate") && reticulate::py_available(initialize = FALSE)is already TRUE.Perhaps that is desirable (because we don't want
sessioninfo::python_info()to have side-effects), but maybe instead of saying "Python is not available" perhapssessioninfo::python_info()could say "Python is not available (or reticulate::py_config has not been called yet)" ?