[CentralOH] Brandon's Astronomy/IPython Notebook Presentations
jep200404 at columbus.rr.com
jep200404 at columbus.rr.com
Thu Feb 21 17:17:36 CET 2013
On Wed, 13 Feb 2013 22:10:23 -0500, jep200404 at columbus.rr.com wrote:
> Brandon's presentation in December
> have created an itch to play with IPython, but there were
> package dependencies that thwarted me until now.
Brandon updated his astronomy-notebooks for Code Mash and then
some afterwards. The current version is both more polished and
covers more than the December CohPy presentation, like live 3D
visualization, and embedded videos. There are examples to learn
from and eye candy. Figuring out the dependencies was not fun.
That's the benefit of starting with the recipe below,
even though it is specific to Xubuntu 12.10.
# 2013-02-21
# Installing IPython Notebook on
# Xubuntu 12.10 Desktop i386 (used as live CD)
# for Brandon Rhodes' (bcr)
# for 2013-01-08 Code Mash astronomy on ipython notebook presentation
# (actually for a later version)
# system wide stuff
start_time=`date`
sudo apt-get update
# sudo apt-get upgrade
yes | sudo apt-get install git
yes | sudo apt-get install python-virtualenv
yes | sudo apt-get install python-dev
yes | sudo apt-get install libfreetype6-dev ;# for matplotlib
yes | sudo apt-get install libpng12-dev ;# for matplotlib
yes | sudo apt-get install libatlas-base-dev ;# for scipy
yes | sudo apt-get install gfortran ;# for scipy
yes | sudo apt-get install python-vtk ;# for mayavi
yes | sudo apt-get install python-wxgtk2.8 ;# this eliminated need for pip install wxPython
git clone https://github.com/brandon-rhodes/astronomy-notebooks/
cd astronomy-notebooks
git checkout 175912317db79a81d44e3651b67f7eef8be68363
# ./setup.sh
cp -p setup.sh xubuntu-12.10-setup.sh
sed -e '/vtk/d' <setup.sh >xubuntu-12.10-setup.sh
./xubuntu-12.10-setup.sh
source venv/bin/activate
# mathjax is not necessary, but cool
echo 'from IPython.external import mathjax; mathjax.install_mathjax();' \
| ipython
echo $start_time
date
# Takes about 37 minutes on VM with one core of 2 GHz Intel T2500.
# Takes about 76 minutes on Acer Aspire One (1.6 GHz Atom N270).
deactivate
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Use the newly installed ipython notebook.
cd astronomy-notebooks
source venv/bin/activate
# ipython notebook can be invoked several ways.
# Note absence of the --pylab inline option.
# The pylab option was left out because the notebooks that use mayavi,
# (3D Earth Satellites and 3D Solar System), spew warnings when ipython
# notebook is started with the --pylab inline option.
ipython notebook
BROWSER=firefox ipython notebook
ipython notebook --browser=firefox
# when all done
deactivate
More information about the CentralOH
mailing list