Skip to content

Instantly share code, notes, and snippets.

@sheyu921
Last active November 23, 2020 01:56
Show Gist options
  • Save sheyu921/609376c3c9584eacc2feace0e1345a55 to your computer and use it in GitHub Desktop.
Save sheyu921/609376c3c9584eacc2feace0e1345a55 to your computer and use it in GitHub Desktop.
run jupyter_notebook on wsl to open chrome on win10
First of all, please install the jupyter notebook
conda install jupyter notebook
or
pip install jupyter notebook
Second, create the configure file of the jupyter notebook
jupyter notebook --generate-config
Third, edit jupyter_notebook_config.py:
1. Open the file
vim ~/.jupyter/jupyter_notebook_config.py
2. Find "#c.NotebookApp.browser" and replace it as follow:
c.NotebookApp.browser = u'/mnt/c/Program\ Files/Google/Chrome/Application/chrome.exe %s'
(note: "/mnt/c/Program\ Files/Google/Chrome/Application/chrome.exe" should be changed as your browser path)
(for edge: u'/mnt/c/Program\ Files/Microsoft/Edge/Application/msedge.exe %s')
3. Find "c.NotebookApp.use_redirect_file = True" and change it as:
c.NotebookApp.use_redirect_file = False
4. Please do not forget save the configure file.
Complete! Please enjoy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment