Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How I setup my IPython/c9 development environment
# I like to set up a c9.io ssh workspace for terminal access and editing files.
# In order to do that it's necessairy to install a recent version of node.js
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install -y gcc g++ make nodejs git
# This is the c9 set-up script. I'm not positive it will remain valid forever.
curl https://raw.github.com/c9/install/master/install.sh | bash
# You will also need to add your c9 key to .ssh/authorized_keys
# Python setup
sudo apt-get install -y python python-software-properties python-zmq python-setuptools python-pip
# Install IPython and its deps
sudo pip install ipython[all] jinja2 tornado
# Other python libs that might be used by code I've recently worked on.
sudo pip install readability-lxml pyyaml cssselect futures
sudo pip install beautifulsoup4 unicodecsv goose-extractor pymongo rdflib
sudo apt-get install -y libxml2-dev libxslt1-dev python-dev python-lxml
sudo apt-get install gfortran libopenblas-dev liblapack-dev
sudo apt-get install -y python-matplotlib
sudo pip install scipy scikit-learn numpy nltk pattern
#install NLTK packages
python -c 'import nltk; nltk.download("maxent_ne_chunker"), nltk.download("maxent_treebank_pos_tagger"), nltk.download("wordnet")'
# Create an IPython profile
ipython profile create nathansnbprofile
# Now configure your profile based on your desired server settings. More info:
# More info: http://ipython.org/ipython-doc/rel-1.0.0/interactive/public_server.html
# This command hackishly appends a basic configuration to the profile in this example.
# I haven't tested whether the configuration works properly, and it doesn't
# create an ssl token as recommended in the guide.
mkdir notebooks
echo "
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'`python -c 'from IPython.lib import passwd; print passwd()'`'
c.NotebookApp.notebook_dir = u'notebooks'
c.NotebookApp.port = 80" | sudo tee -a ~/.ipython/profile_nathansnbprofile/ipython_config.py
# Start IPython
# (if you want to keep tabs on the process I recommend using screen instead of &)
sudo ipython notebook --profile=nathansnbprofile &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment