I am trying to locate which conda
executable I am using. For this, I want to use which
command. As per man pages, it should return the path of the executable. Instead it returns some bash function
(base) ➜ ~ which conda
conda () {
\local cmd="${1-__missing__}"
case "$cmd" in
(activate | deactivate) __conda_activate "$@" ;;
(install | update | upgrade | remove | uninstall) __conda_exe "$@" || \return
__conda_reactivate ;;
(*) __conda_exe "$@" ;;
esac
}
If I try to see the location of __conda_exe
, again I get another function:
__conda_exe () {
(
__add_sys_prefix_to_path
"$CONDA_EXE" $_CE_M $_CE_CONDA "$@"
)
}
where is the conda function I am using?
bash
- are you actually usingzsh
however? – steeldriver Jul 01 '22 at 08:08zsh
try typingwhich -p conda
to see the path instead of the script. Starting version 4.4, conda uses a wrapper shell function to capture commands and pass it to the executable. If you want to know the version, you should useconda --version
– Michael Harvey Jul 01 '22 at 11:52zsh
type __conda_exe
(same aswhence -v
, whilewhich
iswhence -c
,c
forcsh
aswhich
is initially a csh script for csh users) will tell you where the function definition was read from. – Stéphane Chazelas Jul 02 '22 at 08:47