Skip to content

Instantly share code, notes, and snippets.

@evansneath
Last active December 17, 2015 21:59

Revisions

  1. evansneath revised this gist Jun 17, 2013. 1 changed file with 11 additions and 4 deletions.
    15 changes: 11 additions & 4 deletions pybrain-ode-setup.sh
    Original file line number Diff line number Diff line change
    @@ -14,16 +14,22 @@
    # Modify these variables to point to the virtual env parent directory
    # and the root directory containing pybrain source code

    VIRTUALENV_DIR=<virtualenv_dest>
    PYBRAIN_SRC_DIR=<pybrain_root>
    VIRTUALENV_NAME=<name>
    VIRTUALENV_DIR=<parent_dir>
    PYBRAIN_SRC_DIR=<pybrain_dir>

    echo "Creating PyBrain virtual environment"
    cd $VIRTUALENV_DIR
    virtualenv --no-site-packages pybrain-env
    VIRTUALENV_DIR=$VIRTUALENV_DIR/pybrain-env
    virtualenv --no-site-packages $VIRTUALENV_NAME
    VIRTUALENV_DIR=$VIRTUALENV_DIR/$VIRTUALENV_NAME

    echo "Activating virtual environment"
    cd $VIRTUALENV_DIR/bin
    source activate

    echo "Installing NumPy"
    pip install numpy==1.6.2

    echo "Installing SciPy"
    pip install scipy

    @@ -51,6 +57,7 @@ sudo cp * $VIRTUALENV_DIR/lib/python*/site-packages/xode/

    echo "Installing PyBrain"
    cd $PYBRAIN_SRC_DIR
    python setup install

    echo "Adding PyBrain to Python path"
    export PYTHONPATH=$PYBRAIN_SRC_DIR:$PYTHONPATH
  2. evansneath revised this gist May 30, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pybrain-ode-setup.sh
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@
    VIRTUALENV_DIR=<virtualenv_dest>
    PYBRAIN_SRC_DIR=<pybrain_root>

    echo "Creating pybrain virtual environment"
    echo "Creating PyBrain virtual environment"
    cd $VIRTUALENV_DIR
    virtualenv --no-site-packages pybrain-env
    VIRTUALENV_DIR=$VIRTUALENV_DIR/pybrain-env
  3. evansneath revised this gist May 30, 2013. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions pybrain-ode-setup.sh
    Original file line number Diff line number Diff line change
    @@ -49,8 +49,10 @@ echo "Setting up PyBrain ODE environment"
    cd $PYBRAIN_SRC_DIR/pybrain/rl/environments/ode/xode_changes
    sudo cp * $VIRTUALENV_DIR/lib/python*/site-packages/xode/

    echo "Installing PyBrain
    echo "Installing PyBrain"
    cd $PYBRAIN_SRC_DIR

    echo "Adding PyBrain to Python path"
    export PYTHONPATH=$PYBRAIN_SRC_DIR:$PYTHONPATH
    export PYTHONPATH=$PYBRAIN_SRC_DIR:$PYTHONPATH

    echo "Done"
  4. evansneath revised this gist May 30, 2013. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions pybrain-ode-setup.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,10 @@

    # This script is meant to streamline the installation of pybrain with
    # support for ODE enviroments on the OS X operating system.

    #
    # To run:
    # source pybrain-ode-setup.sh
    #
    # Requirements:
    # * pip -- easy_install pip
    # * virtualenv -- pip install virtualenv
    @@ -50,6 +53,4 @@ echo "Installing PyBrain
    cd $PYBRAIN_SRC_DIR
    echo "Adding PyBrain to Python path"
    export PYTHONPATH=$PYBRAIN_SRC_DIR:$PYTHONPATH;
    echo "Done"
    export PYTHONPATH=$PYBRAIN_SRC_DIR:$PYTHONPATH
  5. evansneath revised this gist May 30, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pybrain-ode-setup.sh
    Original file line number Diff line number Diff line change
    @@ -50,6 +50,6 @@ echo "Installing PyBrain
    cd $PYBRAIN_SRC_DIR
    echo "Adding PyBrain to Python path"
    export PYTHONPATH=$PYBRAIN_SRC_DIR:$PYTHONPATH
    export PYTHONPATH=$PYBRAIN_SRC_DIR:$PYTHONPATH;
    echo "Done"
  6. evansneath created this gist May 30, 2013.
    55 changes: 55 additions & 0 deletions pybrain-ode-setup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,55 @@
    #!/bin/bash

    # This script is meant to streamline the installation of pybrain with
    # support for ODE enviroments on the OS X operating system.

    # Requirements:
    # * pip -- easy_install pip
    # * virtualenv -- pip install virtualenv
    # * homebrew -- ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

    # Modify these variables to point to the virtual env parent directory
    # and the root directory containing pybrain source code

    VIRTUALENV_DIR=<virtualenv_dest>
    PYBRAIN_SRC_DIR=<pybrain_root>

    echo "Creating pybrain virtual environment"
    cd $VIRTUALENV_DIR
    virtualenv --no-site-packages pybrain-env
    VIRTUALENV_DIR=$VIRTUALENV_DIR/pybrain-env
    cd $VIRTUALENV_DIR/bin
    source activate

    echo "Installing SciPy"
    pip install scipy

    echo "Installing MatPlotLib"
    pip install matplotlib

    echo "Installing Pyrex"
    pip install pyrex

    echo "Installing ODE Environment"
    brew install ode

    echo "Installing PyODE"
    pip install pyode

    echo "Installing PyOpenGL"
    pip install pyopengl

    echo "Installing Pil"
    pip install pil

    echo "Setting up PyBrain ODE environment"
    cd $PYBRAIN_SRC_DIR/pybrain/rl/environments/ode/xode_changes
    sudo cp * $VIRTUALENV_DIR/lib/python*/site-packages/xode/

    echo "Installing PyBrain
    cd $PYBRAIN_SRC_DIR
    echo "Adding PyBrain to Python path"
    export PYTHONPATH=$PYBRAIN_SRC_DIR:$PYTHONPATH
    echo "Done"