Jupyter-contrib / jupyter_nbextensions_configurator

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

Broken when started with jupyter server, works with notebookapp #153

Open yuvipanda opened 1 year ago

yuvipanda commented 1 year ago

the configurator does not show up when Jupyter Server is used to start the server, but works when notebook app is. This is a big problem for JupyterHubs that want to use this, as ServerApp is starting to become the default there, especially if you have recent versions of JupyterLab installed

To reproduce

  1. Make a clean venv, python -m venv venv
  2. Activate it source venv/bin/activate
  3. Install with pip pip install jupyter jupyterlab jupyter_contrib_nbextensions==0.7.0
  4. Downgrade nbclassic pip install nbclassic<0.5 for #151
  5. Start the server with jupyter lab
  6. Go to http://localhost:8888/tree - you see the classic notebook interface, but no configurator!
  7. Stop the server
  8. Start the server with jupyter notebook
  9. The classic notebook interface opens up, and the configurator is present.

I've tried to install from #152 but that does not fix this issue.

echarles commented 1 year ago

The command to activate the extension has been renames, see https://nbclassic.readthedocs.io/en/latest/nbclassic_dev_faq.html#noteworthy-updates-in-nbclassic and https://github.com/jupyter/nbclassic/pull/138

Can you try with

jupyter nbclassic-extension install --sys-prefix --py jupyter_nbextensions_configurator --overwrite
jupyter nbclassic-extension enable --sys-prefix --py jupyter_nbextensions_configurator
jupyter nbclassic-serverextension install --sys-prefix --py jupyter_nbextensions_configurator --overwrite
jupyter nbclassic-serverextension enable --sys-prefix --py jupyter_nbextensions_configurator
yuvipanda commented 1 year ago

@echarles ah that seems to help (I think!). But generally, this external command would be not required, right? And it's handled by some setuptools magic...

echarles commented 1 year ago

and it's handled by some setuptools magic...

On my env, with notebook 6.x, I always had to run those commands. But yeah, I also wondered the same thing, but have not looked into more details for the reasons. As nbclassic aims to ship the same behavior as notebook 6.x, it sounded logical to have to run those commands (apart from the renaming to avoid naming collision).

yuvipanda commented 11 months ago

The correct incantation now is:

jupyter nbclassic-extension install --sys-prefix --py jupyter_nbextensions_configurator --overwrite
jupyter nbclassic-extension enable --sys-prefix --py jupyter_nbextensions_configurator
jupyter nbclassic-serverextension enable --sys-prefix --py jupyter_nbextensions_configurator