Closed s-u closed 2 years ago
This bit me again (and will bite anyone starting clean install with Jupyter) so we should at least add rcloud.jupyter.python.path
to the sample config or in absence of rcloud.jupyter.python.path
do a simple test for /usr/bin/python{|2|3}
and call use_python()
to avoid this issue.
Yep. I happened to have devtools open and I could see it insistently nagging me every 5-10 seconds do I want to install miniconda. 😝
Either approach (or both) is good with me.
Related: use_python
needs required=TRUE
, or it will pick perhaps the one with the latest numpy, a67d96501f4c
I don't want to get into which version of python is best (look for the one that has Jupyter installed? ugh), so I'm just defaulting rcloud.jupyter.python.path
to /usr/bin/python3
in rcloud.conf.samp
.
I think this is the most common case, and recommended these days.
@gordonwoodhull I'd love to if we could have something about this more formally - i.e. detect such loops - it hits me every time on a clean instance and since c0c4f33 only changes the template, it doesn't help all those configs out there. I know it's really an RStudio issue which is really hard to solve externally (since it's their internal miniconda detection that screws it up), but somehow a warning or catch of the loop would be nice ...
Sure... I don't know how to do that, but cancelling a prompt loop in general would be better than just avoiding the anaconda issue.
Saw this again in a shiny notebook even though we have use_python(..., required=T)
and also rcloud.jupyter.python.path
set to a valid path. Blecch, what obnoxious behavior.
It seems that latest versions of reticulate
can be convinced that this is a really bad idea by setting RETICULATE_MINICONDA_ENABLED=0
env var. Any sane admin would set that in Rprofile.site
(since this is a real problem for any managed infrastructure, i.e. anyone in the real world), but we could help and set it in rcloud.jupyer
if not set.
Recent versions of
reticulate
will try to force the user to install their copy of miniconda if only system Python (even if perfectly working) is installed. This is done via an interactive prompt that cannot be disabled. That prompt will block RCloud at startup whenrcloud.jupyter
language is initialized.RStudio provides no way to skip that prompt so the only options are either:
rcloud.jupyter.python.path
configuration directive is set inrcloud.conf
(which results in call touse_python()
which skips the prompt)