10

I installed Anaconda on my windows 10. and updated all packages. now I am trying to open Jupyter lab by cmd.

when I type this command in cmd: jupyter lab it just opens a tab in google chrome that shows:

"404 : Not Found You are requesting a page that does not exist!" enter image description here

could you please help me to solve this problem to be able to open jupyter lab

thanks

Jérôme
  • 1,254
  • 2
  • 20
  • 25
Mahdi J.
  • 111
  • 1
  • 1
  • 3
  • 1
    Did you see the part in the terminal that is telling you to install `nodejs`? Try `conda install -c conda-forge nodejs` and then try to start the jupyter again – FlyingTeller Feb 23 '18 at 13:30
  • similar question https://stackoverflow.com/questions/33031069/jupyter-giving-404-not-found-error-on-windows-7 – bob123 Feb 23 '18 at 14:32
  • The solutions are working for the same error in jupyter notebook too; which is logical too. So changing the header of question. – thepurpleowl May 08 '19 at 07:22
  • Make sure that the port you use is not already in use, especially by a different Jupyter Lab instance. – nichoio Aug 25 '22 at 19:36

5 Answers5

10

I did:

jupyter serverextension enable --py jupyterlab --user

and

conda install -c conda-forge nodejs

It's running now.

RobertMyles
  • 2,673
  • 3
  • 30
  • 45
user2129887
  • 101
  • 2
  • thanks, works for me now! Your first one is similar to the one in the docs https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#installing-with-previous-versions-of-notebook – Matt Aug 17 '18 at 08:36
2

running jupyter lab in debug mode, suggests that you should first run:

jupyter lab build
7kemZmani
  • 658
  • 1
  • 8
  • 21
2

One reason this can happen is if you already have Jupyter running on the same port. In my case VS Code was automatically starting the jupyter daemon on the background so whenever I tried to spin up Jupyter outside of VS Code on port 8888 I would see the 404 page because my browser was actually navigating to the VS Code instance of Jupyter. One way to identify this is as follows:

  1. In bash run lsof -i -P -n | grep "8888 (LISTEN)". You should see output like:
Python    2085 <user>    9u  IPv4 0xfa77315aec2b468b      0t0  TCP 127.0.0.1:8888 (LISTEN)
Python    2085 <user>   10u  IPv6 0xfa7731561f2fad13      0t0  TCP [::1]:8888 (LISTEN)
  1. The second item is the process id, use ps u <pid> to inspect it:
» ps u 2085
USER      PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
<user>  2085   0.0  0.3 409501984  94656   ??  S     3:34PM   0:02.23 /<path-to-python>/Python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --

To fix this you can either try to kill the VS Code process (but this might mess up jupyter support in your VS Code environment) or you can simply start your external jupyter on a different port, e.g. jupyter lab --port=10000

Robin Zimmerman
  • 593
  • 1
  • 6
  • 17
1

If you are using Anaconda Navigator, install nodejs package within the Navigator. Once nodejs is installed, jupyterLab should be running without any error

Sincole Brans
  • 186
  • 12
0

I had this problem, with the cause described by Robin Zimmerman, I would add that with VScode can easily be setup to avoid this issue. You simply have to change VScode's Jupyter port (instead of having to kill it), by going to the palette command (Cmd+Shift+P), and typing in >Jupyter: Specify Jupyter Command Line Arguments, then choose Custom and finally --NotebookApp.port=9999 --notebook-dir=/tmp

bekyr
  • 1