CondaPkg.jl icon indicating copy to clipboard operation
CondaPkg.jl copied to clipboard

freeze the environment by default when it is activated

Open cjdoris opened this issue 2 years ago • 2 comments

Add a freeze=true argument to activate! (or something like this) to freeze the environment until it is deactivated.

The effect of this is that resolve will refuse to uninstall or modify any already-installed packages - i.e. you can only add new packages, and in this case we use the conda install --freeze-deps, only passing the extra packages to conda install and pip install.

This will let the user safely add new packages even if PythonCall is already running, and prevents disrupting anything already there (which might already be depended upon).

Could even add a --fast flag to resolve which uses this scheme anyway (if possible).

cjdoris avatar Oct 21 '23 12:10 cjdoris

I'm not sure how to mark an environment as frozen. Perhaps just set an env var JULIA_CONDAPKG_FROZEN=true, and check for this in resolve()?

cjdoris avatar Oct 21 '23 12:10 cjdoris

This would be very useful...

ufechner7 avatar Dec 12 '23 06:12 ufechner7