As of conda 4.11, these are the supported shells and their ![]() ![]() Conda activate #Īll Activator classes can be found under conda.activate. The end result is the same: they willĮnd up defining a conda shell function with the behavior described above. The changes are introduced through the Windows Registry. Shells and Powershell, a script is sourced from its location in the base environment. Underlying Activator subclass (more below) can generate the hook code dynamically. What each function does depends on the nature of each shell. Init_long_path: configures Windows to support longer paths. Init_powershell_user: initializes Powershell for the current user. Init_cmd_exe_registry: initializes Cmd.exe through the Windows Registry. Init_xonsh_user: initializes the Xonsh shell for the current user. Init_fish_user: initializes the Fish shell for the current user. Init_sh_system: initializes a Posix shell (like Bash) globally, for all users. Init_sh_user: initializes a Posix shell (like Bash) for the current user. This is done through different functions defined Let’sĬonda init will initialize a shell permanently by writing some shell code in the relevant The _init module, which depends direcly on the module. So how is initialization performed? This is the job of the conda init subcommand, driven by This will be discussed in the next section. ![]() This interception is needed because activation/deactivation requires exporting (or unsetting)Įnvironment variables back to the shell session (and not just temporarily in the Python However, it will intercept two very specific subcommands: It willĭelegate most of the commands to the real conda executable driven by the Python library. The conda shell function is mainly a forwarder function. Manipulation and snappier responses in some conda commands. The main idea behind initialization is to provide a conda shell function that allows the PythonĬode to interact with the shell context more intimately. Improves performance in certain operations Why is initialization needed at all to begin with? There are several reasons:Īctivation requires interacting with the shell context very closely That’s why initialization is there to begin with! Conda initialization # It might find the conda executable if it happens to be in PATH, but this is most often not theĬase. If your conda installation has been properly initialized, it will find the shell function. When you type conda in your terminal, your shell will try to find either:Īn executable file named conda in your PATH directories That if you are operating on the base environment, the target prefix will have the same value Usually defaults to theĪctivated environment, unless -n (name) or -p (prefix) is specified in the command line. The root environment was later renamed toīase, but the code still distinguishes between base and target using the old terminology:Ĭontext.root_prefix: the path where the base conda installation is located.Ĭontext.target_prefix: the environment conda is running a command on. Every otherĮnvironment lived under envs/ in that root environment. Originally, the base installation for conda was called the root environment. Administering a multi-user conda installation. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |