I use pyenv to manage my Python environments and I get the following when simply running bash.
$ bash
pyenv: bash: command not found
I was trying to troubleshoot why pipenv shell failed with the above error, which is how I found out even bash wasn't working. I tried updating pipenv via brew and ran pyenv rehash to regenerate the shims. And bash is definitely present.
$ which bash
/bin/bash
I expected that if pyenv doesn't find a command, the subsequent paths specified by the PATH environment variable will be searched. Interestingly if I execute some non-existant command I don't get a pyenv error.
$ someboguscommand
-bash: someboguscommand: command not found
This suggests to me that pyenv doesn't even search for a matching command in this case and the subsequent paths in PATH are searched, so there must be some special handling with bash.
type bashsay?.bashrcor.bash_profile. You can runbash -xto show a debug trace of what's going on, and where it starts to fail. Runningbashby itself probably worked in spite of the error, and is only showing a warning about a failingpyenvcommand in your.bashrcor.bash_profilewhile otherwise giving you a working shell.PS4=':$BASHPID:${BASH_SOURCE##*/}:$LINENO+' bash -x, to log a process ID, source file and line number with each command in the trace log. Compare theBASHPIDin those logs with the one in your starting shell and you have a conclusive answer as to whether the error is in- or out-of-process.