Skip to content
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

use_condaenv() fixes #1555

Merged
merged 2 commits into from
Mar 20, 2024
Merged

use_condaenv() fixes #1555

merged 2 commits into from
Mar 20, 2024

Conversation

t-kalinowski
Copy link
Member

@t-kalinowski t-kalinowski commented Mar 20, 2024

This patch allows reticulate to bind to a condaenv where the original conda binary that was used to create the condaenv is no longer available. In that case, reticulate will fall back to the same search path as conda_binary("auto").

Note, we still require that a conda binary is available on the system to use a condaenv. Reticulate uses this to call the conda activate command.
The relevant "Finding Conda" section in ?conda_binary is reproduced here:

When conda = "auto", reticulate will attempt to automatically find a conda installation. The following locations are searched, in order:

  1. The location specified by the reticulate.conda_binary \R option,
  2. The location specified by the RETICULATE_CONDA environment variable,
  3. The [miniconda_path()] location (if it exists),
  4. The program PATH,
  5. A set of pre-defined locations where conda is typically installed.

To force reticulate to use a particular conda binary, we recommend
setting:

options(reticulate.conda_binary = "/path/to/conda")

Closes #1542, #1460
Related #1176

@t-kalinowski t-kalinowski merged commit 2b0b804 into main Mar 20, 2024
14 checks passed
@t-kalinowski t-kalinowski deleted the use_condaenv-fixes branch March 20, 2024 16:35
@mtekman
Copy link

mtekman commented Mar 21, 2024

Would it be possible to patch this more such that setting:

options(reticulate.conda.binary = FALSE)

would force a system python?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in normalizePath - still ongoing issue
2 participants