Skip to content

Instantly share code, notes, and snippets.

@0187773933
Created June 20, 2023 12:41
Show Gist options
  • Save 0187773933/2dde3662794e480df2459b9aa9cc44b7 to your computer and use it in GitHub Desktop.
Save 0187773933/2dde3662794e480df2459b9aa9cc44b7 to your computer and use it in GitHub Desktop.
Mac OSX PyENV Install
#!/bin/bash
echo $SHELL
chsh -s /bin/bash
# iTerm --> Settings --> Profiles --> Default --> General --> Command = Login Shell
# https://github.com/pyenv/pyenv
brew update && brew install pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
pyenv install-latest
pyenv global $(pyenv versions --bare | tail -1)
echo 'export PATH="'"$(python3 -m site --user-base)"'/bin:$PATH"' >> ~/.bash_profile && \
echo 'export PATH="'"$PYENV_ROOT/versions/$(pyenv version-name)"'/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment