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

Configurator doesn't load under Jupyter Lab 3 + nbclassic #127

Open
jeffyjefflabs opened this issue Jan 5, 2021 · 16 comments
Open

Configurator doesn't load under Jupyter Lab 3 + nbclassic #127

jeffyjefflabs opened this issue Jan 5, 2021 · 16 comments

Comments

@jeffyjefflabs
Copy link

This is perhaps an obscure use case, but... if you are using Jupyter Lab 3 (which uses the new jupyter_server backend instead of the notebook backend), then go to Help -> Launch Classic Notebook, this will launch the new nbclassic extension, which in turn loads the configurator via a compatibility layer.

It looks like the problem is here where the configurator adds an additional nbextension path -- under nbclassic, that settings dict doesn't have key nbextensions_path, so it throws an exception and the rest of the loader function doesn't run.

I don't know what the best way to fix it is, but as a workaround you can delete those two lines and run jupyter nbextension install jupyter_nbextensions_configurator --py, which will put the extension files in one of the default locations.

@cems2
Copy link

cems2 commented Jan 6, 2021

it doesn't load for me in jupyter notebook either. I'm doing a clean install of anaconda (today), into a clean environment. But I get nothing. And when I try to install an extension in sys-prefix or --user the enable fails on require? X .

@jeffyjefflabs
Copy link
Author

If it's not loading in classic notebook, that's probably #125 and #126. I patched render.js as described in #125 to fix that, but this is another problem that (I think) only happens if you launch via Lab.

@AronT-TLV
Copy link

AronT-TLV commented Mar 9, 2021

I can confirm the problem on Jupiter Labs 3.0.9 and that @jeffyjefflabs patch works.

There is a previous warning that says jupyter_nbextensions_configurator | extension was found and enabled by nbclassic. Consider moving the extension to Jupyter Server's extension paths which probably is the "proper" way to fix it, but not sure how to do that.

@NikosAlexandris
Copy link

What is an end-user supposed to do to get the configurator running under Lab?

@Zsailer
Copy link

Zsailer commented Oct 8, 2021

There's a fix currently in the works here: jupyter/nbclassic#63

Thank you, everyone, for your patience here.

If anyone is willing to test out this PR in nbclassic to verify that it fixes the issue, that would be greatly appreciated!

@Zsailer
Copy link

Zsailer commented Oct 22, 2021

nbclassic 0.3.3 should solve this issue. Upgrade nbclassic with pip install -U nbclassic and the nbextensions_configurator page should work again with latest JupyterLab

@DatumWorld
Copy link

The same thing occurred when I upgraded from python3.8 to python3.9 with conda envs yesterday. I remembered that it happened when I upgraded from python3.6 to python3.8 with conda envs before(but maybe it was fixed later),too.
1ED5519374CFCA8CD813C9657160E396
E02A426B92F5F139E9D56EABC688FB3D
A9551C46F0AF59C457BD2EB0F539FF8D

Reproduce:
1 install using conda create -n jupyterpy39demo python=3.9 and then activate it,and doing the following after that,
pip install jupyterlab notebook jupyter_nbextensions_configurator jupyter_contrib_nbextensions
jupyter contrib nbextension install
jupyter nbextensions_configurator enable
2 launch the lab,go to nbclassic,you will see it.

Envs:
win 10/2019, jupyterlab 3.4.2 ,notebook 6.4.11, nbclassic 0.3.7, jupyter_nbextensions_configurator 0.4.1, jupyter_contrib_nbextensions-0.5.1 ...
and there were some other envs in my computer.

@Zsailer
Copy link

Zsailer commented May 25, 2022

@DatumWorld, do you mind sharing the output of:

jupyter server extension list

@DatumWorld
Copy link

DatumWorld commented May 26, 2022

@DatumWorld, do you mind sharing the output of:

jupyter server extension list

image
There are files in the folder
image
Strangely,while switch to another envs(named jupyterpy38 with python3.8 and conda),it is fine as shown in the following picture
image
The output of the jupyterpy38 envs
CE47A4B676636D0D4C6E269C7A36D0EE

@obarak
Copy link

obarak commented Aug 9, 2022

@Zsailer @DatumWorld Just ran into it myself, are there any updates or a workaround? thanks!

@doctapp
Copy link

doctapp commented Oct 17, 2022

Same problem with Python 3.10 and latest jupyter docker-stacks spark-3.3.0, any fix?
Thanks

@dleen
Copy link

dleen commented Nov 3, 2022

Was experiencing the same issue but it was resolved by applying the patch in: #141
and then running:

$ pip install jupyter_nbextensions_configurator
$ jupyter nbextension install --sys-prefix --py jupyter_nbextensions_configurator --overwrite
$ jupyter nbextension enable --sys-prefix --py jupyter_nbextensions_configurator
$ jupyter serverextension enable --sys-prefix --py jupyter_nbextensions_configurator

@mirekphd
Copy link

mirekphd commented Jan 1, 2023

The patch from #141 seems to fail to work - empty /nbextensions can appear just as they did previously. I tried to install the configurator from master branch at Github (as compared with the standard pip install, because the patch is not released to PyPI yet).

However, I've found a workaround - it is to start Notebook directly (jupyter notebook), rather than indirectly through the Lab (started with jupyter lab). Starting first Lab and only then Jupyter, via Lab's Help menu option makes configurator disappear (its page becomes empty, but with header and a link to "Nbextensions configuration ([more information](<NB_URL>/nbextensions/nbextensions_configurator/rendermd/nbextensions/nbextensions_configurator/readme.md))", rather than raising 404 error).

I verified this with the latest Jupyter core packages versions:

$ jupyter --version
Selected Jupyter core packages...
IPython          : 8.7.0
ipykernel        : 6.19.4
ipywidgets       : 8.0.4
jupyter_client   : 7.4.8
jupyter_core     : 5.1.1
jupyter_server   : 2.0.6
jupyterlab       : 3.5.2
nbclient         : 0.7.2
nbconvert        : 7.2.7
nbformat         : 5.7.1
notebook         : 6.5.2
qtconsole        : not installed
traitlets        : 5.8.0

@juhasch
Copy link
Contributor

juhasch commented Jan 3, 2023

The configurator adds itself to the nbextensions_path settings when it is being loaded (i.e. juypter lab / notebook is started). This is how the configurator finds it's resources.
Starting the notebook using the help menu seems to ignore this setting. A workaround would be to manually copy the required nbextensions_configurator directory (located under jupyter_nbextensions_configurator/static/nbextensions_configurator) to the place where the other notebook extensions are located.

@GraceSevillano
Copy link

Was experiencing the same issue but it was resolved by applying the patch in: #141 and then running:

$ pip install jupyter_nbextensions_configurator
$ jupyter nbextension install --sys-prefix --py jupyter_nbextensions_configurator --overwrite
$ jupyter nbextension enable --sys-prefix --py jupyter_nbextensions_configurator
$ jupyter serverextension enable --sys-prefix --py jupyter_nbextensions_configurator

This is really helpfull , thank u so much

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