How to set jupyter notebook to open on browser automatically

前端 未结 3 1135
孤城傲影
孤城傲影 2021-02-14 23:37

So I don\'t have issues trying to open the jupyter notebook but for some reason, I cannot get it to open in the browser automatically no matter what I\'m trying to do. I follow

3条回答
  •  长情又很酷
    2021-02-15 00:04

    You can fix it by setting to 'false' this setting in the config file

    If not already done, generate a config file : jupyter notebook --generate-config

    Then update this : NotebookApp.use_redirect_file to False (defaulted as True) in ~/.jupyter/jupyter_notebook_config.py

    (from https://jupyter-notebook.readthedocs.io/en/stable/config.html)

    NotebookApp.use_redirect_fileBool

    Default: True

    Disable launching browser by redirect file For versions of notebook > 5.7.2, a security feature measure was added that prevented the authentication token used to launch the browser from being visible. This feature makes it difficult for other users on a multi-user system from running code in your Jupyter session as you.

    However, some environments (like Windows Subsystem for Linux (WSL) and Chromebooks), launching a browser using a redirect file can lead the browser failing to load. This is because of the difference in file structures/paths between the runtime and the browser. Disabling this setting to False will disable this behavior, allowing the browser to launch by using a URL and visible token (as before).

提交回复
热议问题