I think the problem is in "conda init". That sets it up so that you can use 
"conda activate" in a shell and then can continue using that activated 
environment in the original shell. For that, the "conda" command must run 
as a function in the shell, not as an executable called from the shell 
(because one cannot scribble in the environment of the parent process -- at 
least not without horrible hackery).

I was not able to use miniforge without allowing it to do a "conda init". 
That's the part I don't like because it makes me expect that also other 
users who want to use the conda install of sage "the conda way" will have 
to have their ".bashrc" changed and I don't think that's a reasonable thing 
to ask just for people to run sage.

There is obviously a solution: have something like "conda-shell" which 
starts a *subshell* with the conda initialization inserted and/or an 
environment activated. We know which file conda wants "dot-loaded" into the 
shell, so that's the one to dot-load for the subshell initialization.

That's basically what "sage -sh" does. I do not know if that exists 
already. If it does then I think my complaint is that the sage 
documentation doesn't point to it.

It may also be that the "sage" script itself already sets up a strong 
enough environment that, once installed, conda-sage doesn't actually need 
conda activation in order to run properly (my limited tests point in that 
direction). In that case it would still be good if there were a 
"conda-shell" to install conda-sage with, so that one doesn't need to worry 
about "conda init" and sanitizing one's ".bashrc" afterwards.

On Tuesday, 10 February 2026 at 07:53:02 UTC-8 [email protected] wrote:

The problem there at the moment for me is that it punts to "conda" 
documentation for how to get conda set up -- and conda seems very insistent 
on messing with my ".bashrc". I don't want that! 


 You don't need this (and if I recall correctly the interactive installer 
asks if you want to init conda in the shell). The purpose of this option is 
to have the base conda env activated all the time (eg to make conda's 
python available on the shell), but it's perfectly fine to just have a 
`sage` env and activate that manually using `conda activate sage`. See 
https://github.com/conda-forge/miniforge?tab=readme-ov-file#automatic-activation-of-environments
 
for more details.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/d5046560-5ff9-4dfb-8176-0efc325121can%40googlegroups.com.

Reply via email to