"which conda" command returns something not expected
Andrew Henderson
When I type which conda in terminal it returns somewhat unexpected result as below.
conda () { if [ "$#" -ge 1 ] then local cmd="$1" shift else local cmd="" fi case "$cmd" in (activate) _conda_activate "$@" ;; (deactivate) _conda_deactivate "$@" ;; (install | update | uninstall | remove) $_CONDA_EXE "$cmd" "$@" _conda_reactivate ;; (*) $_CONDA_EXE "$cmd" "$@" ;; esac
}I'm using pyenv in MAC.
I looked ~/.zshrc but found nothing special.
I expected which version I'm using to be printed, but I am getting some messages I cannot understand
2 Answers
Executing which -p conda in your zsh, it will return the path instead of the script.
For more information, read this answer.
Starting version 4.4, conda uses a wrapper shell function to capture commands and pass it to the executable. Not sure which version of conda you're using, and I'm more familiar of the Bash wrapper but it definitely looks like such function.
If you want to know the version, you should use conda --version.
Else, use conda or conda --help for more information on the CLI, or have a look to the official doc.