conda-forge / miniforge

A conda-forge distribution.
https://conda-forge.org/miniforge
Other
6.18k stars 321 forks source link

Preventing modification of the `base` environment #636

Open jaimergp opened 3 weeks ago

jaimergp commented 3 weeks ago

Most users should not be touching base for much. It should just provide the tooling needed to run conda, mamba and potential plugins.

Here's a suggestion to make this work:

Cons:

I think this approach is more solid than an editable base, and extends well to other applications like "updating the distribution". For example, if Anaconda Distribution was modelled like this (with base + e.g. anaconda-2024.9), getting the new version is just a matter of creating a new anaconda-2025.1 environment and making it the default.

hmaarrfk commented 3 weeks ago

I've been thinking about this too.

I somewhat feel like it is an anti-pattern for most users to:

  1. Provide them with an automatically activated environment with python.
  2. Ask them not to modify it.

Maybe it is about adding conda_bin to the path, but not the full environment?

There is ALOT of knowledge base written on the internet about "base" that makes "base" feel like a "default". Not sure how to address that part.

jaimergp commented 3 weeks ago

Renaming base would need some changes in conda 🤔 And it's also assumed that base is where conda lives. Either way this will need some user re-education. We need to find the smoothest path, but all of them will have some friction at some point.

jaimergp commented 3 weeks ago

Maybe it is about adding conda_bin to the path, but not the full environment?

That's orthogonal I think. It's not about having conda (the Python entry point) available. When properly initialized, the conda shell function will take care of users having conda available everywhere. The "activate base by default" behaviour is more so the newly installed python is there, along with whatever the installer provided. It will also make it the default argument for --name in conda install|update|remove, etc, and that has nothing to do with whether $PREFIX/condabin is present in PATH or not.

My idea here is that by providing a "new default environment" without conda we:

hmaarrfk commented 3 weeks ago

My idea here is that by providing a "new default environment" without conda we:

got it!