Reputation: 53
Jupyter Notebook and Jupyter Lab worked well until I updated packages and set environments. After that, JupyterLab 3.0 doesn't open. It shows 404 and an error message:
[I 18:21:13.532 LabApp] JupyterLab extension loaded from
C:\Users\Alfonso\AppData\Roaming\Python\Python38\site-packages\jupyterlab
[I 18:21:13.532 LabApp] JupyterLab application directory is C:\Users\Alfonso\AppData\Roaming\Python\share\jupyter\lab
[W 18:21:13.533 LabApp] Error loading server extension jupyterlab
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 2036, in init_server_extensions
func(self)
File "C:\Users\Alfonso\AppData\Roaming\Python\Python38\site-packages\jupyterlab\extension.py", line 226, in load_jupyter_server_extension
add_handlers(web_app, config)
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyterlab_server\handlers.py", line 162, in add_handlers
handlers.append((url_pattern, LabHandler))
AttributeError: 'NotebookWebApplication' object has no attribute 'append'
[I 18:23:27.282 LabApp] Serving notebooks from local directory: C:\Users\Alfonso
[I 18:23:27.282 LabApp] Jupyter Notebook 6.3.0 is running at:
[I 18:23:27.282 LabApp] localhost:8889/…
[I 18:23:27.283 LabApp] or 127.0.0.1:8889/…
[I 18:23:27.283 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 18:23:27.370 LabApp] To access the notebook, open this file in a browser: file:///C:/Users/Alfonso/AppData/Roaming/jupyter/runtime/nbserver-5876-open.html
I changed the browser (Firefox instead of Chrome), followed the suggestions in another post (How to solve 404 error of jupyter lab), but neither worked. Also, I've tried to fix the problem by installing as administrator and as user.
I was wondering if there's a solution that not involves reinstalling all Anaconda distribution.
Installed versions:
jupyterlab
3.0.11jupyterlab_server
2.4.0notebook
6.3.0Upvotes: 5
Views: 20421
Reputation: 15439
Someone else experienced a similar problem when they had conflicting jupyterlab_server
and jupyterlab
version installed (see issue 146 in jupyterlab_server repository), however your versions are fine. At a closer look the issue is with where they are installed:
The traceback includes paths to two locations:
C:\Users\<username>\AppData\Roaming\Python\Python38\site-packages
C:\ProgramData\Anaconda3\lib\site-packages
It indicates that you may have multiple versions of these packages installed in different places (a newer version installed in the local Python directories via pip
, and an older version in the Anaconda3 directory installed via conda
). Because conda on your system has a higher priority, when JupyterLab (installed localy) tries to import its dependencies, it gets the old version of notebook
and jupyterlab_server
from conda directories, which cannot do what it wants.
Solution:
pip uninstall jupyterlab
conda install -c conda-forge jupyterlab
Context: There was an large infrastructure change in JupyterLab 3.0 meaning that it now uses jupyter_server
and jupyterlab_server
instead of notebook
for all the backend work (interacting with kernels, filesystem, opening ports etc).
Upvotes: 7