rstudio / reticulate

R Interface to Python
https://rstudio.github.io/reticulate
Apache License 2.0
1.67k stars 327 forks source link

should install_miniconda() by default install into the default installation directory? #664

Closed lorenzwalthert closed 4 years ago

lorenzwalthert commented 4 years ago

When installing Anaconda on macOS Catalina using the GUI installer tool (not reticulate), the default installation location is in ~/opt according to this documentation. In #661, the proposal to look in this directory for the binary was accepted. I believe the default for installing Miniconda with reticulate::install_miniconda(..., path = miniconda_path()) should be the same as the default installation path when using the official installer (at least this would be a reasonable expectation), so on macOS, it should not be ~/Librar/r-miniconda, but ~/opt (at least for macOS Catalina). Otherwise, the Miniconda installation can't actually be used by reticulate::conda_install() and potentially others I believe because ~/Librar/r-miniconda is again not listed in reticulate:::find_conda() as described in #661. The same logic applies to other operating systems like Linux and Windows.

This boils down to adapting miniconda_path() to return these default paths. Does this sound reasonable?

cc: @hafen

ha0ye commented 4 years ago

I generally agree, but is this still an issue in the latest version of reticulate()? (1.14 was released shortly after this issues was created)

It seems like miniconda_path() is now included among the list of locations that find_conda() searches (via miniconda_conda()).

lorenzwalthert commented 4 years ago

I agree the problem that the installation is not found is resolved (https://github.com/rstudio/reticulate/commit/a3f323024eeeeb1659f3ec02dc4ea4dc26761d7e), not sure I had the GitHub version when filing this issue. Now it remains unclear if it is desirable that the default installation directory is not the same as with the manual installer. Probably too late to change that anymore.