-
Notifications
You must be signed in to change notification settings - Fork 326
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
Conda discovery heuristics and environmental variables #1490
Comments
Thanks for the detailed issue. Some notes:
Thanks, this should updated in the docs. This logic is encoded in Lines 182 to 188 in df1ac35
|
Discovery of CONDA environments often fails -- specifically in containerized linux environments. I think this could be easily fixed by:
A. extending the list of directories searched by current heuristics
B. respecting the standard environmental variables used by Conda / Ananconda when set (e.g.
CONDA_PREFIX
andCONDA_PYTHON_EXE
, e.g. see configuration docs on anoconda.com.From what I can see, discovery of where CONDA lives is based on a variety of heuristics
reticulate/R/conda.R
Lines 730 to 735 in afb0a22
reticulate/R/config.R
Lines 527 to 547 in afb0a22
This second list includes paths in
~/opt
but not/opt
. Given the first list, I think this is a typo? (Also unclear why these heuristics are set by different code bases at all). Specifically, many containerized deployments used by universities etc will want to map~/
to persistent user-config, and need a place outside of~/
for default installs. (/opt
being a standard linux convention for this, though you also see/srv/
and even/var
being used here). I think the situation would be much better if/opt
paths are included in the second example?I'd be happy to prepare a PR that adds
/opt
to the second list, though you may prefer to just patch that directly? It would be nice additionally to honor the CONDA_* env vars when set before falling back on the heuristic list of paths to search. Lastly, these issues (e.g. when does reticulate look for Conda and where, and when does it fall back to looking for something else? does it try virtualenv first or conda first if no env is forced by one of the current env vars? do not seem to be answered by the current (otherwise very nice!) docs on discovery order in https://rstudio.github.io/reticulate/articles/versions.html.Thanks for considering this. Reticulate is amazing, we just want users of containerized RStudio setups (rocker, 2i2c/jupyerlab rstudio proxy) to get the best experience out of the box too.
The text was updated successfully, but these errors were encountered: