"which" is a separate package and may not be installed. Also, shell has a built-in command for the same purpose. Use that.