How to open IPython Notebook file

The .ipynb file is an IPython Notebook file containing the Python commands, output and notes that another user has recorded.

To be able to create or open this file, we need to install IPython and its notebook package:

$ sudo apt install ipython-notebook

After installation, it is invoked as:

$ ipython notebook

This open a Mathematica-like web interface in your browser. You can create new IPython Notebook files or open existing files for viewing.

On a recent IPython Notebook file, I got this error when I opened it:

Error loading notebook
Unreadable Notebook: Unsupported JSON nbformat version 4 (supported version: 3)

This means that a more recent version of notebook package needs to be used to open this file. More confusingly, the notebook package has been moved into a new project called Jupyter. Since this is a new development its package was not available on my ancient Ubuntu.

I installed it from PyPI using:

$ sudo pip3 install jupyter

To open its notebook web interface:

$ jupyter-notebook

I was able to open the problematic IPython Notebook file correctly using this.

Tried with: Jupyter 4.x and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s