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 adding condabin/ to PATH #960

Open
2 tasks done
jaimergp opened this issue Mar 17, 2025 · 1 comment · May be fixed by #965
Open
2 tasks done

Support adding condabin/ to PATH #960

jaimergp opened this issue Mar 17, 2025 · 1 comment · May be fixed by #965
Assignees
Labels
type::feature request for a new feature or capability

Comments

@jaimergp
Copy link
Contributor

jaimergp commented Mar 17, 2025

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

constructors supports adding bin (on Windows, Scripts) to PATH, but it's discouraged because it pollutes the executable space.

We should provide an option where the installer only offers to add condabin to PATH, so conda (and mamba) can be in PATH without shell initialization.

Why is this needed?

This Miniforge issue provides a good overview of the rationale: conda-forge/miniforge#453

What should happen?

If "Add condabin to PATH" is enabled in the installer and selected by the user, then $INSTDIR/condabin would be in PATH after the installation.

Additional Context

This could also be tackled in conda as part of conda init, but I think this is cleaner? Shell initialization does not necessarily need PATH entries, and viceversa. Should it be a separate conda subcommand? As a plugin? Part of conda-standalone? Open for feedback though.

@jaimergp jaimergp added the type::feature request for a new feature or capability label Mar 17, 2025
@jaimergp jaimergp moved this to TODO 📬 in Quansight <> Anaconda 2025 Mar 17, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Mar 17, 2025
@jaimergp jaimergp self-assigned this Mar 18, 2025
@jaimergp
Copy link
Contributor Author

jaimergp commented Mar 24, 2025

Writing down some notes here after researching the currently available options in constructor.

We have two sets of configuration options that can affect PATH:

  • initialize_conda (paired with initialize_by_default). The behavior is platform dependent:
    • On Unix, it controls whether to run conda init as part of the installation (Unix). This results in a conda shell function being defined for the shell session. When paired with activate_base=true (default),$CONDA_ROOT/bin is also added to PATH (which also contains conda).
    • On Windows, it controls whether to add some specific paths to the PATH. It also removes previous additions to PATH if they happened to be still in the uninstallation registry entries.
  • register_python (paired with register_python_default). Windows only. Controls whether to register base's Python as the default Python installation for the user or system.

None of these adds condabin to PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature request for a new feature or capability
Projects
Status: In Progress 🏗️
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

1 participant