I am on a Mac OS, and my default browser is Firefox.
In terminal, I ran jupyter notebook --generate-config
. Then, in a text editor, I opened ~/.jupyter/jupyter_notebook_config.py
I changed c.NotebookApp.browser = u''
to c.NotebookApp.browser = u'/Applications/Safari.app/Contents/MacOS/Safari %s'
However, when I run jupyter notebook
, I get the following output:
```
[I 15:14:23.717 NotebookApp] [nb_conda_kernels] enabled, 3 kernels found
[I 15:14:24.586 NotebookApp] [nb_anacondacloud] enabled
[I 15:14:24.589 NotebookApp] [nb_conda] enabled
[I 15:14:24.626 NotebookApp] ✓ nbpresent HTML export ENABLED
[W 15:14:24.626 NotebookApp] ✗ nbpresent PDF export DISABLED: No module named nbbrowserpdf.exporters.pdf
[I 15:14:24.632 NotebookApp] Serving notebooks from local directory: /Users/ironaut/Tutorials/DAND/Jupyter
[I 15:14:24.632 NotebookApp] 0 active kernels
[I 15:14:24.632 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=74a348c3fdec07e929dde216c244e1a9164badc47f079819
[I 15:14:24.632 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Failed to acquire exclusive access to history store at file:///Users/ironaut/Library/Safari/History.db. Falling back to an in-memory history store.
[W 15:22:55.201 NotebookApp] 401 POST /login?next=%2Ftree%3F (::1) 1.30ms referer=http://localhost:8888/login?next=%2Ftree%3F
```
Without the changes to the config file, jupyter launches okay in Firefox.
You almost had all steps. Re-iterating for the benefit of the readers.
Make sure that firefox
is the default browser. Or any other browser for that matter.
I am using atom
as text editor. Feel free to use any other.
Execute
$ jupyter notebook --generate-config
$ atom ~/.jupyter/jupyter_notebook_config.py
find and change
c.NotebookApp.browser = u''
to
c.NotebookApp.browser = u'/usr/bin/open -a Safari %s'
Test
$ jupyter notebook
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With