How to share an IPython notebook


IPython has an amazing notebook feature. Now it's possible to share these notebooks online, with embedded plots, images, formulas, HTML pages...

  1. Run notebook server:

    ipython2 notebook

    or, if you use matplotlib,

    ipython2 notebook --pylab inline

    You need to install python2-tornado to use notebooks (it's an optional IPython dependency).

  2. An app page will open.

    • Create a notebook.
    • Use it as usual. It is more or less similar to normal IPython.
  3. When ready to publish:

    • choose File -> Save in the notebook menu
    • in the directory where you run the notebook, find .ipynb file (or do File -> Download as -> IPython (.ipynb)); it is a JSON file
    • paste this JSON on or other pastebin service
    • go to and insert Gist's URL (any public URL works)
    • et voilà!

An example:

  • ⇒

I just tried it ( ⇒ It works for me with IPython 0.13.

Update 2015-10-06: Since this year, GitHub is rendering IPython/Jupyter notebooks directly (both on GitHub repository and on GitHub Gists):