Skip to content

Instantly share code, notes, and snippets.

@cpcloud
Last active December 18, 2015 03:19
Show Gist options
  • Save cpcloud/5717392 to your computer and use it in GitHub Desktop.
Save cpcloud/5717392 to your computer and use it in GitHub Desktop.
Set up an Ubuntu vagrant box for pandas testing.
function setup_pandas_build_env()
{
local cwd=`pwd`
if [ ! -e "$1" ]; then
mkdir "$1"
else
[ ! -d "$1" ] && echo "$1 is not a directory" && return 1
fi
cd "$1"
vagrant init "$1" "$2"
vagrant up
for cmd in update upgrade 'dist-upgrade' \
'build-dep python-numpy python-scipy python-tables python-matplotlib' \
'install virtualenvwrapper git-core mercurial bzr' \
autoremove autoclean 'mkvirtualenv pandas'; do
vagrant ssh -c "sudo apt-get -y $cmd"
done
cd "$cwd"
}
function setup_pandas_python_env()
{
mkvirtualenv pandas
workon pandas
local s
for s in distribute pip; do
pip install -U "$s"
done
for s in cython numpy; do
pip install -U "$s" &
done
wait
for s in python-dateutil pytz numexpr; do
pip install -U "$s" &
done
wait
for s in scipy tables six matplotlib openpyxl xlrd xlwt ipython html5lib; do
pip install -U "$s" &
done
wait
# co bs4 src
bzr branch lp:beautifulsoup &
# co pd src
git clone git://github.com/pydata/pandas.git
cd pandas
python setup.py build_ext --inplace
python setup.py develop
pip install -U statsmodels
}
@cpcloud
Copy link
Author

cpcloud commented Jun 5, 2013

all the vagrant boxes are here

@cpcloud
Copy link
Author

cpcloud commented Jun 5, 2013

virtualenvwrapper is not available on lucid lynx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment