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

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

Open
yuvipanda opened this issue Mar 22, 2023 · 4 comments
Open

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

yuvipanda opened this issue Mar 22, 2023 · 4 comments

Comments

@yuvipanda
Copy link

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 nbclassic >=0.5 breaks jupyter_nbextensions_configurator #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
Copy link
Collaborator

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 jupyter/nbclassic#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
Copy link
Author

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

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 added a commit to 2i2c-org/utoronto-image that referenced this issue Jun 24, 2023
Following suggestion from
Jupyter-contrib/jupyter_nbextensions_configurator#153
that we need to explicilty enable the configurator.
nbclassic also has hit 1.0, which might help.

Ref 2i2c-org/infrastructure#2380
yuvipanda added a commit to 2i2c-org/utoronto-image that referenced this issue Dec 27, 2023
May allow us to switch to jupyter server here too. I had
to remove the nbclassic-serverextension install line from
here: Jupyter-contrib/jupyter_nbextensions_configurator#153
@yuvipanda
Copy link
Author

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

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

2 participants