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

ri_session can load the wrong python version #15

Open
jspijker opened this issue Oct 9, 2024 · 1 comment
Open

ri_session can load the wrong python version #15

jspijker opened this issue Oct 9, 2024 · 1 comment

Comments

@jspijker
Copy link
Owner

jspijker commented Oct 9, 2024

If a conda environment is used (reticulate::use_condaenv), then the py version is not loaded due to the system("which ..") call (which often returns the system wide py version)

@jspijker
Copy link
Owner Author

jspijker commented Nov 6, 2024

Apparently, reticulate lazy-loads the condaenv. So only after an API call, the conda env is used. Hence, before an API call the system wide python version is used in use_python.

Calling e.g. py_config, it does an API call, after which the right conda environment is used. However, when no python conda environment is present (and thus, the system wide py shoudl be used) reticulate asks if it should create a conda env (r-reticulate). This confuses users who are not used to conda (and work on systems without conda environments).

The only way to solve this is to either add an extra configuration step before ri_session, so the user can set the right python environment, or to use conda envs by default (and this environment must be present on package load, or set during package load)

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

No branches or pull requests

1 participant