pyenv shell when eval "$(pyenv init -)" is in .zshenv

Created on 14 Apr 2016  ·  3Comments  ·  Source: pyenv/pyenv

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.

question

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?

All 3 comments

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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeroxenator picture zeroxenator  ·  3Comments

decentral1se picture decentral1se  ·  3Comments

tasugi picture tasugi  ·  3Comments

marcosfede picture marcosfede  ·  3Comments

bersbersbers picture bersbersbers  ·  3Comments