Last active
December 18, 2015 03:19
-
-
Save cpcloud/5717392 to your computer and use it in GitHub Desktop.
Set up an Ubuntu vagrant box for pandas testing.
This file contains 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
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 | |
} |
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
all the vagrant boxes are here