help
help copied to clipboard
Can't open Jupyter in browser after merge #4260 | WSL on Windows | "redirect file" method
Hello,
I run Jupyter lab from within WSL in Windows 10. I've had a working setup that opened a chrome browser when I run the jupyter lab command.
Below is the contents of my jupyter_notebook_config.py
file
jupyter_notebook_config.py
:
c = get_config()
c.NotebookApp.browser = 'chrome.exe -incognito --app=%s'
c.NotebookApp.open_browser = True
conda list
output:
Old/Working Jupyter Package Info:
jupyter 1.0.0 py36_7
jupyter_client 5.2.3 py36_0
jupyter_console 5.2.0 py36_1
jupyter_core 4.4.0 py36_0
jupyterlab 0.34.9 py36_0
jupyterlab_launcher 0.13.1 py36_0
New/Broken Jupyter Package Info:
jupyter 1.0.0 py36_7
jupyter_client 5.2.4 py36_0
jupyter_console 6.0.0 py36_0
jupyter_core 4.4.0 py36_0
jupyterlab 0.35.3 py36_0
jupyterlab_server 0.2.0 py36_0
Before upgrading Jupyter lab this would produce the following terminal output and the browser would open correctly.
The new jupyter set up would produce the following on running jupyter lab
:
Which would open the following in a Google Chrome window:
Now obviously this is due to the fact that the WSL file system is not easily accessible by the Windows operating system so the:
/home/raul_surface/.local/share/jupyter/runtime/nbserver-324-open.html
file can't be opened
Problem/Question
The issue seems to be this new method of opening/accessing the Jupyter window
To access the notebook, open this file in a browser:
file:///home/raul_surface/.local/share/jupyter/runtime/nbserver-183-open.html
Which seems to be the default as opposed to using the URL
So how do I force Jupyter lab to try to open the URL by default.
Thank you in advance for your time, Raul Flores
I think this comes from a recent change in the Jupyter notebook
package (not JupyterLab). See https://github.com/jupyter/notebook/pull/4260 for discussion, including some discussion at the end on WSL.
^ This has potentially cripples 50% of my students' build environments because they are WSL users. For those that got an Xserver working properly, firefox/chrome (from within Linux) can spawn from file.
However, for those that cannot get Xserver working and set the BROWSER variable to a Windows firefox.exe/chrome.exe this completely breaks their build.
The workaround right now is to downgrade notebook
to version 5.7.0
Same issue on a chromebook; Jupyter must run on a linux vm but the browser cannot access that file system.