I use a Mac and installed pyenv using brew install pyenv
and followed through the instruction after. I placed eval "$(pyenv init -)"
command in .zshenv
but usually get this error on terminal command not found: pyenv
.
When I put the command in .zlogin
, it works. I'm not sure this is a right approach, but the doc could be more helpful. Thanks.
I guess you don't have /usr/local/bin
in your $PATH
at the time of .zshenv
is loading. I suggest you to try setting /usr/local/bin
in your .zshenv
to make sure pyenv symlink prepared by brew available at /usr/local/bin/pyenv
.
Thanks, @yyuu. It now works.
Thanks @yyuu It's also works for me, but i wanna know why. In export PATH="$PYENV_ROOT/bin:$PATH
there is already $PATH
, which should contain /usr/local/bin
. Why should I add extra /usr/local/bin
in .zshenv
?
Most helpful comment
Thanks @yyuu It's also works for me, but i wanna know why. In
export PATH="$PYENV_ROOT/bin:$PATH
there is already$PATH
, which should contain/usr/local/bin
. Why should I add extra/usr/local/bin
in.zshenv
?