-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does reticulate aggressively push miniconda over the system python? #754
Comments
This seems like a bug -- we shouldn't be nagging about installing Miniconda here. How have you configured |
For context: the primary goal is to avoid users who inadvertently bind to whatever the "default" version of Python is, which is often an older or crippled version that comes pre-installed with the system. |
I've simply the env variable (For context: I'm building a docker container for ML use cases and want the user to be able to have a valid python environment "out-of-the-box". I'm aiming for this to work without forcing/assuming the container will only be ever run using the "default user", since our RStudio-server containers are often used in multi-user mode, or run as root, etc, hence my messing with |
p.s. if you have docker, you should be able to reproduce the above warning with our dev container:
|
I can confirm that in a situation where you have virtual environments (in However, you can prevent this by setting
in your (It also wouldn't happen if you issued |
I think I also fell victim to this and ended up with several hundred mb of miniconda because of reticulate (which, adding insult to injury, was only called as a suggested package to test a package). I eventually found that adding |
Thanks all. I didn't know about But would still prefer we could avoid the miniconda prompt in this case (or at least on Linux systems like Dirk says!) |
@cboettig just to clarify, in case what I wrote gave rise to a misunderstanding... RETICULATE_AUTOCONFIGURE just switches off that "install miniconda" prompt, it does not mean you have to use any specific virtualenv. You can still pick the one you want by issuing |
@skeydan thanks much for the clarification, I had totally misunderstood that! Yes, that does just what I want it to do. I'm happy to leave this open if you still want to change this behaviour (I'm still a bit unclear what specifically triggers the miniconda prompt), but for me just turning off the miniconda prompt with the env var does what I need. thanks again. |
Just a note to say that this same Miniconda prompt also occurs in RStudio Cloud when opening a new project, even though there are at least two installs of Python already available (Py 2.7 runs in the terminal by default on startup and Py 3.5 is available if Miniconda install prompt response is ignored by typing "n", as above). I haven't tried setting up a venv on RStudio Cloud yet though... kind of assumed I was already working in one, but perhaps not? |
@cgeger it might be worth voicing these concerns on the RStudio community forums: https://community.rstudio.com/c/rstudio-cloud/14 |
It is pretty insulting to give me that prompt and interpret a “no, I don’t want miniconda” as “cancel installation”. How about reticulate checks if the python it finds is actually old or crippled instead of assuming that? |
This (documented) variable helps: edd@rob:~$ grep -i reticulate ~/.Renviron
## reticulate, please use my system python
RETICULATE_PYTHON=/usr/bin/python3
edd@rob:~$ Rscript -e 'library(reticulate); np <- import("numpy"); np$reshape(np$arange(1, 9), c(2L, 2L, 2L))'
, , 1
[,1] [,2]
[1,] 1 3
[2,] 5 7
, , 2
[,1] [,2]
[1,] 2 4
[2,] 6 8
edd@rob:~$ |
The way it looked to me:
Don’t get me wrong, I’m sure you have reasons for that prompt. But as a library developer myself I make very sure to just confront my users with disruption like this when absolutely necessary. So I repeat. To be nice to users, either
|
For contexct: I don't disagree personally. I also happen to like having a working Linux distribution system and strongly prefer all 'other' components to come from it. But last time I brought this up (years ago, I think) @kevinushey pointed me to this variable and it seems to work for me in the (relatively light regular) usage I make of |
As always, a reproducible example would be helpful. It's not clear to me when or why @flying-sheep is being prompted for Miniconda. I understand it's frustrating (and it seems like the behavior here is probably unintentional), but that doesn't help me solve your problem. |
A few more observations from a Linux system (Ubuntu 20.04):
|
Reticulate no longer suggests or encourages usage of miniconda |
I have a nicely set up python environment with
venv
which reticulate easily discovers, as shown below. However, before even reporting this environment,py_discover_config()
stops to tell me "No non-system installation of Python could be found, would you like to download and install Miniconda?". Why does reticulate throw this message and prompt? Is there a strong reason to only use python & python libraries that are installed in a user's home directory?The text was updated successfully, but these errors were encountered: