Last active
March 2, 2019 02:36
-
-
Save namgivu/c06c9f509373aa22de82ae05d7da86b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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