How to change the default browser used by the ipyt

2019-01-21 07:04发布

I'm on Linux Mint 17.3. How do I change the default browser used by the Jupyter notebook? I've installed the notebook as a part of Anaconda 3, and it opens up in my default browser, which is Chrome. But for some reason, Chrome won't let me make a new ipynb. Clicking the 'new' button simply doesn't do anything.So I copied the notebook url to Firefox, and it works perfectly fine there.

Is there a way I can make it work with Chrome? Otherwise, how do I change the default browser? The usual answer I've come across is that I've gotta change the c.NotebookApp.browser option, but I can't find a way to do so, since trying to find ipython_notebook_config in the terminal comes up with 4 results:

./anaconda3/lib/python3.5/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_notebook_config.py
./anaconda3/lib/python3.5/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_notebook_config.py
./anaconda3/pkgs/jupyter_core-4.0.6-py35_0/lib/python3.5/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_notebook_config.py
./anaconda3/pkgs/jupyter_core-4.0.6-py35_0/lib/python3.5/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_notebook_config.py

2条回答
我想做一个坏孩纸
2楼-- · 2019-01-21 07:07

Chrome Browser > Settings (Scroll all the way to the bottom) > Change Default browser to Chrome > New window would pop up. Change the default browser there!

Worked for me! (Windows 10 User)

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-01-21 07:21

You can create jupyter_notebook_config.py by:

jupyter notebook --generate-config

Then you go to

~/.jupyter/jupyter_notebook_config.py

and change

# c.NotebookApp.browser = ''

to for example:

c.NotebookApp.browser = '/usr/bin/google-chrome'

You can choose which ever browser is installed. You'll find the path for example by typing which firefox Do not forget to delete the #

查看更多
登录 后发表回答