Last active
December 17, 2015 21:59
-
-
Save evansneath/5678215 to your computer and use it in GitHub Desktop.
Streamlines the installation of PyBrain with support for ODE environments on OSX
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 | |
# 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 | |
# * 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_NAME=<name> | |
VIRTUALENV_DIR=<parent_dir> | |
PYBRAIN_SRC_DIR=<pybrain_dir> | |
echo "Creating PyBrain virtual environment" | |
cd $VIRTUALENV_DIR | |
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 | |
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 | |
python setup install | |
echo "Adding PyBrain to Python path" | |
export PYTHONPATH=$PYBRAIN_SRC_DIR:$PYTHONPATH | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment