All Articles Kinsa Creative

Running django_extensions' iPython Notebook from a Vagrant Virtual Machine

Forward the port. In the Vagrantfile:

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  ... "forwarded_port", guest: 8888, host: 8888

Bring up the virtual machine and shell into it. Install the requirements:

$ pip install django-extensions ipython pyzmq jsonschema terminado jupyter

Add 'django_extensions', to the list of INSTALLED_APPS in the Django project's settings file.

Add a list of configuration options to the Django project's settings file to run the server on and disable the attempt to launch a browser which won't be available in the virtual machine:

    '--ip', '',
    '--port', '8888',

Now django-extensions can run it:

$ ./ shell_plus --notebook

And, back on the host, the iPython notebook will be accessible in a Web browser at http://localhost:8888.


February 23, 2017
Updated to work with the latest versions of the modules noting the use of the jupyter module to get around the ImportError: No module named notebookapp error when attempting from IPython.html.notebookapp import NotebookApp as well as the replacement of configuration within with configuration within the project settings file.


Email us at