The main motivations:
-
py_install() will automatically infer the appropriate environment type if e.g. RETICULATE_PYTHON_ENV is set; right now in tensorflow it seems "auto" means "virtualenv" (except on Windows) but one might have an active conda environment they want to use instead.
-
reticulate understands how to use environments both by name and path; it seems like the tensorflow shims only understand environments by name.
If required, a parameter for destroying and re-creating the environment could be kept (ie as a guard against buggy TensorFlow updates).