how to open Jupyter notebook in chrome on windows

前端 未结 16 704
-上瘾入骨i
-上瘾入骨i 2020-12-07 20:52

On my Windows PC, i have anaconda installed and when I open a jupyter notebook, it opens up in internet explorer, but I would like to use Chrome instead. Does anyone know ho

相关标签:
16条回答
  • 2020-12-07 21:13

    I found an easier solution that may help beginners to coding.

    go to

    C:\Users\'-your user-'\AppData\Roaming\jupyter\runtime
    

    and find a file named

    nbserver-6176-open.html
    

    then

    Right-click > open with > Choose default program...

    Here, what ever you choose would be saved on your Windows to open all HTML files; therefore when you run Jupyter notebook, it would open in the program you want.

    0 讨论(0)
  • 2020-12-07 21:14

    I just set chrome as my default browser and jupyter launches in Chrome now.

    However, we have also the following approach, but it did not work for me:

    "CONDA version 4.7.5 and jupyter 6.0.0. - Windows 10"

    1) Open Anaconda and launch your environment in terminal

    2) Create config file and open file in notepad

    3) Modify line of NotebookApp with chrome and save modification

    4) Launch Jupyter

    :( ... but it still launches in Mozilla.

    0 讨论(0)
  • 2020-12-07 21:15

    For windows set the default browser to open html files to Chrome. Configuration > Default Apps > Default Apps by File Type. Worked for me.

    0 讨论(0)
  • 2020-12-07 21:16

    See response on this thread that has worked for me:

    https://stackoverflow.com/a/62275293/11141700

    NOTE - Additional STEP 3 that has made the difference for me compared to similar approaches suggested here

    In short:

    Step 1 - Generate config for Jupyter Notebook:

    jupyter notebook --generate-config
    

    Step 2 - Edit the config file using "nano" or other editor

    The config fileshould be under your home directory under ".jupyter" folder:

    ~/.jupyter/jupyter_notebook_config.py
    

    Step 3 - Disable launching browser by redirecting file

    First comment out the line, then change True to False:

    c.NotebookApp.use_redirect_file = False
    

    Step 4 - add a line to your .bashrc file to set the BROWSER path

    export BROWSER='/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'
    

    For me it was Chrome under my Windows Program File. Otherwise any linux installation under WSL doesn't have a native browser to launch, so need to set it to the Windows executable.

    Step 5 - restart .bashrc

    source .bashrc
    
    0 讨论(0)
提交回复
热议问题