Skip to content

Instantly share code, notes, and snippets.

@oldcai
Last active August 29, 2015 14:12
Show Gist options
  • Save oldcai/1c13291eb4e81f0c4aa8 to your computer and use it in GitHub Desktop.
Save oldcai/1c13291eb4e81f0c4aa8 to your computer and use it in GitHub Desktop.

Revisions

  1. Old Cai revised this gist Jan 6, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion init_python_env.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    sudo apt-get install -y libsqlite3-dev libbz2-dev zsh git-core curl
    sudo apt-get install -y libsqlite3-dev libbz2-dev zsh git-core curl libtiff4-dev libjpeg8-dev zlib1g-dev \
    libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
    curl -L http://install.ohmyz.sh | sh
    curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
    pyenv update
  2. Old Cai created this gist Jan 6, 2015.
    18 changes: 18 additions & 0 deletions init_python_env.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    sudo apt-get install -y libsqlite3-dev libbz2-dev zsh git-core curl
    curl -L http://install.ohmyz.sh | sh
    curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
    pyenv update
    pyenv install 2.7.9
    pyenv global 2.7.9

    cat >> ~/.zshrc <<END
    export PATH="$HOME/.pyenv/bin:$PATH"
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"
    export WORKON_HOME="$HOME/.pyenv/versions"
    source $HOME/.pyenv/versions/2.7.9/bin/virtualenvwrapper.sh
    END

    $HOME/.pyenv/versions/2.7.9/bin/pip install virtualenv virtualenvwrapper
    chsh -s `which zsh`