Skip to content

Instantly share code, notes, and snippets.

@mxub
Last active January 7, 2018 13:01

Revisions

  1. mxub revised this gist Jan 7, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions virtualenvwrapper.md
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,7 @@ This is what I did to set up my python development system on my mac
    ## Add this to .zshrc
    ```
    # everything for virtualenvwrapper
    VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2
    export WORKON_HOME=~/Envs
    export PROJECT_HOME=~/Projekte/Python
    source /usr/local/bin/virtualenvwrapper.sh
  2. mxub revised this gist Jul 5, 2016. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions virtualenvwrapper.md
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,10 @@ source /usr/local/bin/virtualenvwrapper.sh
    ## Helper Commands
    mkvenv2() {mkvirtualenv -p $which=python2 "$*";}
    mkvenv3() {mkvirtualenv -p $which=python3 "$*";}
    ## better exit:
    alias workoff="deactivate"
    ```
    ## Commands

  3. mxub revised this gist Jul 5, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions virtualenvwrapper.md
    Original file line number Diff line number Diff line change
    @@ -28,6 +28,9 @@ in that env `python --version` will return 2.x

    in that env `python --version` will return 3.x

    ### Join an environment
    `workon test_python_x`


    ## The Hard Way

  4. mxub revised this gist Jul 5, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion virtualenvwrapper.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ This is what I did to set up my python development system on my mac

    ## First Steps:
    1. `brew install python, python3`
    2. `sudo pip install virtualenvwrapper`
    2. `pip --user install virtualenvwrapper`

    ## Add this to .zshrc
    ```
  5. mxub revised this gist Sep 17, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions virtualenvwrapper.md
    Original file line number Diff line number Diff line change
    @@ -18,12 +18,12 @@ mkvenv3() {mkvirtualenv -p $which=python3 "$*";}
    ```
    ## Commands

    ### Create a new _python2_ env (the hard way)
    ### Create a new _python2_ env (the easy way)
    `mkvenv2 test_python_2`

    in that env `python --version` will return 2.x

    ### Create a new _python3_ env (the hard way)
    ### Create a new _python3_ env (the easy way)
    `mkvenv3 test_python_3`

    in that env `python --version` will return 3.x
  6. mxub renamed this gist Sep 17, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  7. mxub revised this gist Sep 16, 2015. 1 changed file with 17 additions and 1 deletion.
    18 changes: 17 additions & 1 deletion cheatsheet.md
    Original file line number Diff line number Diff line change
    @@ -11,9 +11,25 @@ This is what I did to set up my python development system on my mac
    export WORKON_HOME=~/Envs
    export PROJECT_HOME=~/Projekte/Python
    source /usr/local/bin/virtualenvwrapper.sh
    ## Helper Commands
    mkvenv2() {mkvirtualenv -p $which=python2 "$*";}
    mkvenv3() {mkvirtualenv -p $which=python3 "$*";}
    ```
    ## Commands

    ### Create a new _python2_ env (the hard way)
    `mkvenv2 test_python_2`

    in that env `python --version` will return 2.x

    ### Create a new _python3_ env (the hard way)
    `mkvenv3 test_python_3`

    in that env `python --version` will return 3.x


    ## Basic Commands
    ## The Hard Way

    ### Create a new _python2_ env (the hard way)
    `mkvirtualenv -p /usr/local/bin/python test`
  8. mxub revised this gist Feb 4, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions cheatsheet.md
    Original file line number Diff line number Diff line change
    @@ -17,8 +17,10 @@ source /usr/local/bin/virtualenvwrapper.sh

    ### Create a new _python2_ env (the hard way)
    `mkvirtualenv -p /usr/local/bin/python test`

    in that env `python --version` will return 2.x

    ### Create a new _python3_ env (the hard way)
    `mkvirtualenv -p /usr/local/bin/python3 test3`

    in that env `python --version` will return 3.x
  9. mxub revised this gist Feb 4, 2014. 1 changed file with 17 additions and 5 deletions.
    22 changes: 17 additions & 5 deletions cheatsheet.md
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,24 @@
    # Cheat Sheet for virtualenvwrapper
    This is what I did to set up my python development system on my mac

    #First:
    1. brew install python, python3
    2. sudo pip install virtualenvwrapper
    ## First Steps:
    1. `brew install python, python3`
    2. `sudo pip install virtualenvwrapper`

    # Add to .zshrc
    ## Add this to .zshrc
    ```
    # everything for virtualenvwrapper
    export WORKON_HOME=~/Envs
    export PROJECT_HOME=~/Projekte/Python
    source /usr/local/bin/virtualenvwrapper.sh
    ```
    ```

    ## Basic Commands

    ### Create a new _python2_ env (the hard way)
    `mkvirtualenv -p /usr/local/bin/python test`
    in that env `python --version` will return 2.x

    ### Create a new _python3_ env (the hard way)
    `mkvirtualenv -p /usr/local/bin/python3 test3`
    in that env `python --version` will return 3.x
  10. mxub created this gist Feb 4, 2014.
    12 changes: 12 additions & 0 deletions cheatsheet.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@

    #First:
    1. brew install python, python3
    2. sudo pip install virtualenvwrapper

    # Add to .zshrc
    ```
    # everything for virtualenvwrapper
    export WORKON_HOME=~/Envs
    export PROJECT_HOME=~/Projekte/Python
    source /usr/local/bin/virtualenvwrapper.sh
    ```