I have been running pyenv from homebrew on Mac so I could run Python3 rather than 2.7. However when I upgraded to Catalina I ran into an issue that pyenv wasn’t working anymore. When I went through the GitHub page for pyenv at: pyenv and followed all of the steps and got to this part:
- Add
pyenv initto your shell to enable shims and autocompletion. Please make sureeval "$(pyenv init -)"is placed toward the end of the shell configuration file since it manipulatesPATHduring the initialization.$ echo -e ‘if command -v pyenv 1>/dev/null 2>&1; then\n eval “$(pyenv init -)”\nfi’ >> ~/.bash_profile- Zsh note: Modify your
~/.zshenvfile instead of~/.bash_profile. - fish note: Use
pyenv init - | sourceinstead ofeval (pyenv init -). - Ubuntu and Fedora note: Modify your
~/.bashrcfile instead of~/.bash_profile.General warning: There are some systems where theBASH_ENVvariable is configured to point to.bashrc. On such systems you should almost certainly put the abovementioned lineeval "$(pyenv init -)"into.bash_profile, and not into.bashrc. Otherwise you may observe strange behaviour, such aspyenvgetting into an infinite loop. See #264 for details.
- Zsh note: Modify your
.zshenv should actually be .zshrc