How does conda's source activate foo work
Found details for the builtin source
in ss64's man pages.
Unless you provide an exact path to filename then bash will look first via the PATH variable and then in the current directory (only if filename is not found in $PATH.) If any arguments are supplied, they become the positional parameters when filename is executed. Otherwise the positional parameters are unchanged.
So,
source activate <env-name>
is calling /Users/dilum/anaconda/bin/activate
and passing the desired environment name as an argument.
Related videos on Youtube
Dilum Ranatunga
Updated on September 18, 2022Comments
-
Dilum Ranatunga over 1 year
Anaconda's documentation for managing environments states that activating an environment is done using:
source activate <env-name>
I've noticed that with conda installed,
activate
is in the path:$ which activate /Users/dilum/anaconda/bin/activate
Does source find files in the path as well? And I suppose the second parameter (the environment-name) is simply processed by the
activate
script?