Skip to content

Instantly share code, notes, and snippets.

@mikelikespie
Created August 23, 2012 01:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikelikespie/3431211 to your computer and use it in GitHub Desktop.
Save mikelikespie/3431211 to your computer and use it in GitHub Desktop.
Launchctl for ipython notebook (and installation instructions)
# how to set up the virtualenv used in this
# First move org.lolrus.ipython-notebook.plist to ~/Library/LaunchAgents
NOTEBOOK_DIR=${HOME}/notebook
brew install zmq
which virtualenv > /dev/null || sudo easy_install virtualenv # easiest to install virtualenv this way if you dont have it
mkdir ${NOTEBOOK_DIR}
cd ${NOTEBOOK_DIR}
virtualenv .env
source .env/bin/activate
easy_install readline # pip messes up readline in a virtualenv... this is also optional
pip install -U git+https://github.com/ipython/ipython.git tornado pyzmq
launchctl load ~/Library/LaunchAgents/org.lolrus.ipython-notebook.plist
# now it's installed!
open http://localhost:8888
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>WorkingDirectory</key>
<!-- CHANGE THIS TO YOUR HOME DIRECTORY -->
<string>/Users/mike/notebook</string>
<key>Label</key>
<string>org.lolrus.ipython-notebook</string>
<key>ProgramArguments</key>
<array>
<string>./.env/bin/ipython</string>
<string>notebook</string>
<string>--no-browser</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment