- Install brew
brew install pyenv
- The following should create a snippet to be added to .profile
curl https://pyenv.run | bash
if not, add the following snippet to your .profile file such as .bash_profile
, .zshrc
export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
- To install a python version 3.8.8 with pyenv
pyenv install 3.8.8
- To set your python version globally
pyenv global 3.8.8
- To check pyenv versions available
pyenv versions
- Install poetry with pip so you can take advantage of pyenv
pip install poetry