Jupyter-contrib/jupyter_nbextensions_configurator

nbextensions tab is missing in Jupyter Notebook Server

startakovsky opened this issue · 7 comments

The nbextensions tab is blank, and the Navigate menu item has no items in the dropdown.

I am trying to use the toc2 tool, and I can see the table of contents when I click the toc button in the toolbar (see image).
image

Questions:

  • How do I make those numbered headings permanent when I save the notebook?
  • Why does http://localhost:8888/nbextensions return a blank white screen?
  • Is there a way to make a cell at the top showing the table of contents with each section hyperlinked?

THANK YOU.

Current System:

Python Version: 3.10.6
Running this in a virtual environment.
MacOS 12.6 on a late 2021 MacBook Pro.

jupyter contrib nbextension install --user
jupyter nbextension enable toc2/main

After running jupyter --version I get:

IPython          : 8.5.0
ipykernel        : 6.16.2
ipywidgets       : 8.0.2
jupyter_client   : 7.4.4
jupyter_core     : 4.11.2
jupyter_server   : 1.21.0
jupyterlab       : not installed
nbclient         : 0.7.0
nbconvert        : 7.2.2
nbformat         : 5.7.0
notebook         : 6.5.1
qtconsole        : 5.3.2
traitlets        : 5.5.0

To reproduce this, I ran the following:

pip install jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user
jupyter contrib nbextension install --user
jupyter nbextension enable toc2/main

I debugged by checking the browser console for errors (usually F12 -> console)

It said "The resource from “http://localhost:8888/static/components/jquery-ui/themes/smoothness/jquery-ui.min.css was blocked ..." checking the URL gives some sort of 404.

So I searched my conda site packages directory for the folder "static" and found this path:

${conda_path}/envs/${env_name}/Lib/site-packages/nbclassic/static/components/jquery-ui

Then copied all content from subfolder dist to that path and now it works. Seems the paths in nbclassic have changed but haven't in nbextensions.

I am getting this other behavior too .

image

So @gingsi do we have a bug? Is this issue going to be triaged?

Is using pyenv not supported?

Sorry for the confusion, I am not on the jupyter team.

But while I am here, the errors sound like your environment is broken. Try to delete everything and start from scratch, i.e. a new miniconda / pyenv / whatever environment, or a new python installation. Personally I like miniconda the most for environment handling.

@gingsi comment helped me. But I spent some time by thinking what exactly I need to do.
So literally following:

$ cd {your site-packages dir}/nbclassic/static/components/jquery-ui
$ cp -r dist/* .

this fixed the problem for me.
to find your site-packages dir: $ python -m site | grep site-packages