Reticulate: user is prompted for miniconda even if anaconda already present

Created on 12 Oct 2019  Â·  8Comments  Â·  Source: rstudio/reticulate

It may be by design but I was surprised by this behavior, so I share it

I already have Anaconda installed, and it is found by reticulate, but now I am prompted about miniconda

> library(reticulate)
> py_config()
No non-system installation of Python could be found.
Would you like to download and install Miniconda?
Miniconda is an open source environment management system for Python.
See https://docs.conda.io/en/latest/miniconda.html for more details.

Would you like to install Miniconda? [Y/n]: n
Installation aborted.
python:         C:\Users\chris\Anaconda3\envs\r-reticulate\python.exe
libpython:      C:/Users/chris/Anaconda3/envs/r-reticulate/python37.dll
pythonhome:     C:\Users\chris\Anaconda3\envs\r-reticulate
version:        3.7.3 | packaged by conda-forge | (default, Jul  1 2019, 22:01:29) [MSC v.1900 64 bit (AMD64)]
Architecture:   64bit
numpy:           [NOT FOUND]

python versions found: 
 C:\Users\chris\Anaconda3\envs\r-reticulate\python.exe
 C:\Users\chris\Anaconda3\python.exe
 C:\Users\chris\Anaconda3\envs\docker\python.exe

I would have expected reticulate to find my anaconda installation, and, possibly suggest to switch to miniconda if better. I find it odd to offer to download an other distribution whereas I have one working.

Most helpful comment

The response is stored in a file located at the path referenced by:

reticulate:::miniconda_meta_path()

If you remove that file, then reticulate will prompt again.

All 8 comments

This was by design (although perhaps we can still reconsider). Our intention was that, unless the user has explicitly requested a particular version of Python with one of the use_*() helpers, we should prompt the user to install Miniconda and make that the default.

Note that you will only be prompted once, and rejecting that prompt is "sticky" (you won't get bugged about it again on the same account / machine)

I see. Thanks for the clarification ! I guess I should always use use_* to get going. And the message indeed appears only once.

I guess it just feels unexpected when you already have anaconda configured to get advice to download the little brother miniconda. I would have considered to be prompted if no Python was found or if on windows not a python with conda.
But maybe there is a change in reticulate to consider that it should work better and exclusively with miniconda and it means I should switch from Anaconda to miniconda ?

Our idea is that by standardizing on a known variant of Python we'll make
the package (and other packages that use it) easier to install and support.
As you may have noticed a large percentage of the GitHub issues are Python
configuration issues (often it's the case that the version the user already
has is somehow mal-configured)

On Mon, Oct 14, 2019 at 2:05 AM Christophe Dervieux <
[email protected]> wrote:

I see. Thanks for the clarification ! I guess I should always use use_*
to get going. And the message indeed appears only once.

I guess it just feels unexpected when you already have anaconda configured
to get advice to download the little brother miniconda. I would have
considered to be prompted if no Python was found or if on windows not a
python with conda.
But maybe there is a change in reticulate to consider that it should work
better and exclusively with miniconda and it means I should switch from
Anaconda to miniconda ?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/rstudio/reticulate/issues/607?email_source=notifications&email_token=AAAZPR7TT2EJUWMQHYA2YE3QOQD4JA5CNFSM4JABWJB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBDNOGI#issuecomment-541513497,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAZPR66JLCNRMVRLVGZODLQOQD4JANCNFSM4JABWJBQ
.

That is completly understandable. This is the approach with TinyTex distribution too, that saves a lot of painful problem with Rmarkdown pdf rendering, regarding LaTex configuration.

This is fine by me as when you say no it is not promped again. I'll document internally to our users to use miniconda with reticulate, also specify explicitly the python version.

Thanks a lot for your precision.

I've now made this change: if an Anaconda environment is available, it will be used in preference to Miniconda.

This was by design (although perhaps we can still reconsider). Our intention was that, unless the user has explicitly requested a particular version of Python with one of the use_*() helpers, we should prompt the user to install Miniconda and make that the default.

Note that you will only be prompted once, and rejecting that prompt is "sticky" (you won't get bugged about it again on the same account / machine)

And what can I do to get that prompt again now that I changed my mind? Thanks!

The response is stored in a file located at the path referenced by:

reticulate:::miniconda_meta_path()

If you remove that file, then reticulate will prompt again.

Hello Kevin @kevinushey
Referring to
"This was by design (although perhaps we can still reconsider). Our intention was that, unless the user has explicitly requested a particular version of Python with one of the use_*() helpers, we should prompt the user to install Miniconda and make that the default."
This is perfectly fine if you use it just in R, where if propmted for installing Miniconda you can simply answer yes and that's it.
The other story is when you use it from let say Scala through RScala library, when you only need to use pyarrow to load parquet files. Then RClient of RScala library is prompted with the question whether to install Miniconda, but the user of RScala API is not able to respond to this question, because it is visible only in the logs on the Azure Databricks cluster, because the application is packed into jar file and has nothing in common with interactive usage like in notebooks.
Having said this mybe you could reconsider this design decision and make it use some existing, default Python installation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

athammad picture athammad  Â·  4Comments

sahil-kumar picture sahil-kumar  Â·  9Comments

gadepallivs picture gadepallivs  Â·  8Comments

GreenGrassBlueOcean picture GreenGrassBlueOcean  Â·  7Comments

berkorbay picture berkorbay  Â·  4Comments