[CentralOH] IPython & Notebook on Xubuntu 12.10 Desktop i386

jep200404 at columbus.rr.com jep200404 at columbus.rr.com
Thu Feb 14 04:10:23 CET 2013


"Python for Data Analysis" (pfda) and Brandon's presentation in December
have created an itch to play with IPython, but there were 
package dependencies that thwarted me until now. 

Here's the recipe I came up with that plays nice at least with 
the early part of pfda. I did my installation testing on a live 
CD in a virtual machine, because it's easy to go back to its 
original state to see if my instructions really have all the 
necessary steps, or when I did some magic step that I forgot to 
put in the recipe below. 

# 2013-02-13
# Installing Ipython Notebook on 
# Xubuntu 12.10 Desktop i386 (used as live CD)
# for Python for Data Analysis

start_time=`date`
mkdir ~/pfda
cd ~/pfda
sudo apt-get update
# sudo apt-get upgrade
yes | sudo apt-get install python-virtualenv
yes | sudo apt-get install python-dev
yes | sudo apt-get install libfreetype6-dev
yes | sudo apt-get install libpng12-dev
virtualenv env
source env/bin/activate
pip install ipython
pip install tornado
pip install pyzmq
pip install numpy
pip install pandas
pip install matplotlib
echo 'from IPython.external import mathjax; mathjax.install_mathjax();' \
| ipython
echo $start_time
date
# Takes about 20 minutes in VM with one core of 2 GHz Intel T2500. 
# Takes about 40 minutes on Intel Atom N270 (X12.10 installed on hard drive)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

# Get some data. The *usagov_bitly_data2012-03-16-1331923249* file is 
# relevant for following along in pfda. 

mkdir data
cd data
wget -x -a log \
https://github.com/pydata/pydata-book/blob/master/ch02/usagov_bitly_data2012-03-16-1331923249.txt?raw=true \
bitly.measuredvoice.com/bitly_archive/usagov_bitly_data2012-03-16-1331923249 \
bitly.measuredvoice.com/bitly_archive/usagov_bitly_data2012-11-12-1352761058 \
bitly.measuredvoice.com/bitly_archive/usagov_bitly_data2013-02-12-1360684158
cd -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

# Here's another way of getting a whole bunch of pfda stuff.

# bitly just recently dropped 
# bitly.measuredvoice.com/bitly_archive/usagov_bitly_data2012-03-16-1331923249.
# Fortunately, there's a backup on github.
# https://github.com/pydata/pydata-book/blob/master/ch02/usagov_bitly_data2012-03-16-1331923249.txt?raw=true
# Note the .txt ending on the github filename.

yes | sudo apt-get install git
git clone https://github.com/pydata/pydata-book ;# takes about 40.00 MiB

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

# Here's how I invoke the IPython notebook.
# The path is for pasting into the notebook. 

ipython notebook --pylab inline
path = 'data/github.com/pydata/pydata-book/blob/master/ch02/usagov_bitly_data2012-03-16-1331923249.txt?raw=true'



More information about the CentralOH mailing list