Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbextensions tab is missing in Jupyter Notebook Server #142

Open
startakovsky opened this issue Nov 5, 2022 · 7 comments
Open

nbextensions tab is missing in Jupyter Notebook Server #142

startakovsky opened this issue Nov 5, 2022 · 7 comments

Comments

@startakovsky
Copy link

startakovsky commented Nov 5, 2022

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
@startakovsky
Copy link
Author

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
Copy link

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
Copy link
Author

I am getting this other behavior too .

image

@startakovsky
Copy link
Author

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

@startakovsky
Copy link
Author

Is using pyenv not supported?

@simon-ging
Copy link

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
Copy link

odv052 commented Nov 23, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants