greta resolves which Python to use, in this order:
The RETICULATE_PYTHON environment variable, if set (usually in
~/.Renviron, your .Rprofile, or your shell environment). This
always wins: it takes precedence over any stored preference.
Your stored preference, set with greta_set_python().
An auto-detected "greta-env-tf2" conda environment (created by
install_greta_deps()) - kept so setups from older greta versions keep
working after upgrading.
Otherwise, the managed (uv) environment (the default as of greta 0.6.0):
reticulate installs a compatible Python, TensorFlow, and TensorFlow
Probability automatically on first use. No setup is needed - this happens
"automagically".
For the managed (uv) environment, greta automatically enables uv's offline
mode once the environment is installed, so it no longer reaches out to
PyPI. Set UV_OFFLINE=0 yourself to force online resolution (for example,
to refresh the environment), or UV_OFFLINE=1 to force offline mode -
greta never overrides a value you have already set.
To check which Python greta is currently using, and which it will use
after a restart, call greta_sitrep().
If a stored preference appears to be ignored, RETICULATE_PYTHON is
usually why: remove it from wherever it is set (for example
~/.Renviron), then restart R. Note that Sys.unsetenv() within a
session is not enough, as the choice is applied when greta loads.
Your choice is stored under tools::R_user_dir("greta", "config") and
applied the next time greta is loaded, so you will need to restart R
for it to take effect.