On Tuesday, February 10, 2026 at 6:11:56 PM UTC+1 Nils Bruin wrote:
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. That goes beyond my knowledge of the conda internals. I would suggest you just open an issue in the miniforge repo about the need for "conda init". 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. Note that if you use conda then there is no need for sage-the-distro (and thus, in particular, for the sage shell env init). In particular, if you install sage via conda (conda create -n sage sage) then you only have a "sage" script/cli available if you first activate the conda env (conda activate sage). We could add to the documentation instructions on how to setup a custom subshell that automatically activates the sage conda env. I like that idea. Without trying, a bash script with ` #!/usr/bin/env conda run -n sage sage` should do the job. -- 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/f3899f29-7153-4dd0-9003-93f2a6bd2893n%40googlegroups.com.
