Jupyter-contrib / jupyter_nbextensions_configurator

A jupyter notebook serverextension providing config interfaces for nbextensions.
Other
981 stars 121 forks source link

nbextensions tab is missing in Jupyter Notebook Server #142

Open startakovsky opened 2 years ago

startakovsky commented 2 years ago

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:

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
startakovsky commented 2 years ago

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
simon-ging commented 2 years ago

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.

startakovsky commented 2 years ago

I am getting this other behavior too .

image
startakovsky commented 2 years ago

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

startakovsky commented 2 years ago

Is using pyenv not supported?

simon-ging commented 2 years ago

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.

odv052 commented 2 years ago

@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