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
Add this line to your jupyter_notebook_config.py
file:
c.NotebookApp.use_redirect_file = False
This should open jupyter notebooks automatically in your browser with the localhost
/127.0.0.1
URL.
More info for the sake of completeness:
~/.jupyter/jupyter_notebook_config.py
. If missing can be generated (as you did) with the command: jupyter notebook --generate-config
At the command line, type:
jupyter notebook --browser=<Browser>
<Browser>
being Chrome
, Safari
, Firefox
, etc.
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).