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:
- 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)
- 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