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

Support deactivate from conda #1589

Open
latot opened this issue Apr 15, 2024 · 2 comments
Open

Support deactivate from conda #1589

latot opened this issue Apr 15, 2024 · 2 comments

Comments

@latot
Copy link

latot commented Apr 15, 2024

When we use use_condaenv we go inside, but actually we don't have a way to go back to the system env!

Would be good be able to have a function to go out of the actual conda env.

If is changing PATH, is enough to remove the conda env paths, while if want to use conda deactivate it will need this to be executed from conda before.

conda config --set auto_activate_base false

Thx

@t-kalinowski
Copy link
Member

t-kalinowski commented Apr 16, 2024

Reticulate does not have support for finalizing a Python session, and then deactivating and detaching from the Python installation. Updating the PATH is just one part of a sequence of actions that reticulate takes when it binds to a Python binary.

In theory we could add support for finalizing and detaching, but it's not something implemented today. The implementation complexity for this feature would be non-trivial, and the alternative approach is simple and works well: restart the R session.

@latot
Copy link
Author

latot commented Apr 16, 2024

Hi!, mm, yeah, there seems to be some steps I didn't thought.

I think is getting pretty complex because there is a mix of conda and python, which are not necessary related. Is true we can handle a particular python version or venvs of python, but conda is not for that specifically, is to work with more apps/bins and similar, due to how you are speaking, seems reticulate has mixed both functions.

Sadly, this feature is very important for some functions, which can not be done restarting R.
With conda we can create an env (not python env), do some work, create a new env, do again other stuff, but when we finish, we need to go back to the system env, or when we use reticulate, we will not able to use again easily the system apps that also exists on conda base.

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

2 participants