nbviewer#

nbviewer

nbconvert as web service: Renders Jupyter notebooks as static web pages.

Installation#

  1. The Notebook Viewer requires several binary packages that have to be installed on our system, for

$ sudo apt install libmemcached-dev libcurl4-openssl-dev pandoc libevent-dev
$ brew install libmemcached openssl pandoc libevent
  1. The Jupyter Notebook Viewer can then be installed in a new virtual environment with:

    $ mkdir nbviewer
    $ cd !$
    cd nbviewer
    

    Note

    The notebook app outputs the error AttributeError: module 'tornado.gen' has no attribute 'Task' with current versions of Tornado. This error does not occur with tornado<6.0, , see also Delete Terminal Not Working with Tornado version 6.0.1:

    $ pipenv install "tornado<6.0"
    

    Now nbviewer can also be installed:

    $ pipenv install nbviewer
    
  2. For testing, the server can be started with:

    $ pipenv run python -m nbviewer --debug --no-cache
    

Extending the Notebook Viewer#

The notebook viewer can be extended to include providers, see Extending the Notebook Viewer.

Access control#

If the viewer is run as Create service nbviewer, only users who have authenticated themselves on the JupyterHub can access the nbviewer’s notebooks.