Launch IPython notebook with selected browser
On my mac, I got the following command to use Firefox instead of my default Chrome:
jupyter notebook --browser firefox
This is not a real answer. I just want to share with the less computer savvy what JPG's answer looks like step-by-step. Presumably, on Windows Explorer (screen capture attached below), the file jupyter_notebook_config.py
is listed:
In my case, the directory for the file (on top menu of Explorer) was C:\Users\My_name\.jupyter
The second part of the answer can be implemented by simply pasting:
import webbrowser
webbrowser.register('firefox', None, webbrowser.GenericBrowser('C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe'))
c.NotebookApp.browser = 'firefox'
in the space on the space seen on the screen capture below, corresponding to the jupyter_notebook_config.py
opened within PyCharm:
... only that I set it up to open in Opera:
import webbrowser
webbrowser.register('opera', None, webbrowser.GenericBrowser('C:\\Program Files (x86)\\Opera\\launcher.exe'))
c.NotebookApp.browser = 'opera'
I had the same problem on windows and got it work this way:
Create a config file with command
ipython profile create default
Edit ipython_notebook_config.py file, search for line
#c.NotebookApp.browser =''
and replace it with
import webbrowser
webbrowser.register('firefox', None, webbrowser.GenericBrowser('C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe'))
c.NotebookApp.browser = 'firefox'
then it works for me.
Hope it will help you.
JPG