Jupyter_contrib_nbextensions: installation is not working

Created on 25 May 2018  路  3Comments  路  Source: ipython-contrib/jupyter_contrib_nbextensions

Summary

The [toc2] extension is not working after following the instructions to install it.

Is there another step I am missing? Could you please help me troubleshoot this issue?

Details

Here are the commands I ran:

pip install jupyter_contrib_nbextensions

jupyter contrib nbextension install --user

# enable the configurator
jupyter nbextensions_configurator enable --user

At this point, I can go to localhost:8888/nbextensions and see:

nbextensions configuration 2018-05-25_10-47-49

I enabled Table of Contents (2), but in my notebook I do not see any indication that the extension is enabled. I shutdown jupyter and restarted it, but nothing changed.

I also tried enabling the Code prettify extension but it fails to show up.

I'm running Jupyter Lab like this:

jupyter lab --no-browser

jupyter lab --version
0.32.1

Here are some diagnostic commands that might provide needed details:

jupyter nbextension list
Known nbextensions:
  config dir: /PHShome/ks38/.jupyter/nbconfig
    notebook section
      contrib_nbextensions_help_item/main  enabled
      - Validating: OK
      toc2/main  enabled
      - Validating: OK
      nbextensions_configurator/config_menu/main  enabled
      - Validating: problems found:
        - require?  X nbextensions_configurator/config_menu/main
      code_prettify/code_prettify  enabled
      - Validating: OK
    tree section
      nbextensions_configurator/tree_tab/main  enabled
      - Validating: problems found:
        - require?  X nbextensions_configurator/tree_tab/main
  config dir: /data/srlab/slowikow/src/miniconda2/envs/py3/etc/jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled
      - Validating: OK
cat /PHShome/ks38/.jupyter/nbconfig/notebook.json
{
  "CodeCell": {
    "cm_config": {
      "indentUnit": 2,
      "autoCloseBrackets": false
    }
  },
  "load_extensions": {
    "contrib_nbextensions_help_item/main": true,
    "code_prettify/code_prettify": true,
    "nbextensions_configurator/config_menu/main": true,
    "toc2/main": true
  },
  "Notebook": {
    "Header": false,
    "Toolbar": false
  },
  "keys": {
    "command": {
      "bind": {
        "ctrl-j": "jupyter-notebook:move-cell-down",
        "ctrl-k": "jupyter-notebook:move-cell-up"
      }
    }
  }
}
ll /PHShome/ks38/.local/share/jupyter/nbextensions/toc2/
total 5.2M
-rw-rw-r--. 1 ks38 srlab 411K May 25  2018 demo2.gif
-rw-rw-r--. 1 ks38 srlab  87K May 25  2018 demo3.gif
-rw-rw-r--. 1 ks38 srlab  76K May 25  2018 demo_dark.png
-rw-rw-r--. 1 ks38 srlab 3.4M May 25  2018 demo.gif
-rw-rw-r--. 1 ks38 srlab  26K May 25  2018 icon.png
-rw-rw-r--. 1 ks38 srlab  35K May 25  2018 image.png
-rw-rw-r--. 1 ks38 srlab 3.7K May 25  2018 main.css
-rw-rw-r--. 1 ks38 srlab 8.0K May 25  2018 main.js
-rw-rw-r--. 1 ks38 srlab  11K May 25  2018 README.md
-rw-rw-r--. 1 ks38 srlab  34K May 25  2018 toc2.js
-rw-rw-r--. 1 ks38 srlab 3.5K May 25  2018 toc2.yaml

Most helpful comment

@jfbercher Thanks! You might consider adding a sentence to the README that says something like "These extensions are not compatible with Jupyter Lab". I think many users have some confusion about this.

As you mentioned, I found a table of contents extension for Jupyter Lab:

https://github.com/ian-r-rose/jupyterlab-toc

To install it, these commands worked for me:

# install Node
conda install nodejs

# install the extension
jupyter labextension install jupyterlab-toc

All 3 comments

I'm sorry! I did not realize that nbextensions do not work with Jupyter Lab (#1283).

In other words, the extensions will not work at localhost:8888/lab.

When I go to localhost:8888/notebooks and create a new notebook, I can see that the extensions are working:

untitled 2018-05-25_11-09-51

These extensions are not compatible with jupyterlab.
The extension framework, the apis have changed and are not yet stable.
There is a toc for jupyterlab here: https://github.com/ian-r-rose/jupyterlab-toc

@jfbercher Thanks! You might consider adding a sentence to the README that says something like "These extensions are not compatible with Jupyter Lab". I think many users have some confusion about this.

As you mentioned, I found a table of contents extension for Jupyter Lab:

https://github.com/ian-r-rose/jupyterlab-toc

To install it, these commands worked for me:

# install Node
conda install nodejs

# install the extension
jupyter labextension install jupyterlab-toc
Was this page helpful?
0 / 5 - 0 ratings