I have installed pandoc using homebrew and the Anaconda python distribution using pyenv. I've just found that Anaconda comes with its own pandoc binary and since the pyenv shims come before homebrew in my PATH, I cannot use the homebrew (and newer) version of pandoc.

This is my current PATH

➜ ~ echo $PATH
➜ ~ which pandoc

Is there a way to force the terminal to use the homebrew version of a binary without breaking the PATH?

1 Answer 1


You can always provide the full path to the binary instead of using the PATH at all.

$ /usr/local/bin/pandoc

To make multiple executions easier, you can create an alias.

alias pandoc=/usr/local/bin/pandoc
$ which pandoc

$ alias pandoc=/usr/local/bin/pandoc

$ which pandoc
pandoc: aliased to /usr/local/bin/pandoc

To make future executions easier, put this alias in a .profile.

To bypass the alias without removing it, prepend a \.

$ \pandoc

The ‘right way’ is still to modify your PATH.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .