Skip to content

Instantly share code, notes, and snippets.

@namgivu
Last active March 2, 2019 02:36
Show Gist options
  • Save namgivu/c06c9f509373aa22de82ae05d7da86b8 to your computer and use it in GitHub Desktop.
Save namgivu/c06c9f509373aa22de82ae05d7da86b8 to your computer and use it in GitHub Desktop.
#!/bin/bash
: run the below scripts line by line not run the whole as a batch file
: install pyenv ref. bit.ly/nnpipenv
#create $bashrc soft-linked to ~/.bash_profile, as in macos, if $bashrc file not exists while ~/.bash_profile does exist
if [[ ! -f ~/.bashrc ]] && [[ -f ~/.bash_profile ]]; then ln -s ~/.bash_profile ~/.bashrc ; fi
bashrc='~/.bashrc'
cd ~/.pyenv; git pull # update pyenv to latest
latest36=`pyenv install --list | grep -E '^[ ]*3.6' | tail -n1` # get latest version
echo "installing latest python 3.6 as $latest36"
pyenv install -s $latest36 # do install # -s aka -skip-existing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment