I\'m on a windows machine without admin right and I would like to run jupyter on chrome, while the default browser is another.
I have a local installation of the Ana
In Windows, write in cmd/ Anaconda Prompt:
jupyter notebook --generate-config
The jupyter_notebook_config.py file generated is situated in "C:\Users\YourName\.jupyter\" folder.
Open it using a text editor and change #c.NotebookApp.browser = ''
to
import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser(u'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'))
c.NotebookApp.browser = 'chrome'
and save the file.
Now execute the jupyter-notebook command and the set browser will be used.
To achieve this on Windows 10, I had to do the following:
For a temporarily choose/specify a browser from the Anaconda Prompt CLI (note the order/type of quotes, they seem to be different to most other answers as those answers failed to work for me):
jupyter notebook --browser="'C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe' %s"
To set it permanently, edit the jupyter_notebook_config.py file in your .jupyter folder. I'm not certain that you need to escape the backslashes (i.e. \ vs just ), but I used the following and it worked (again, note that the order/type of quotes is different):
c.NotebookApp.browser = '"C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe" %s'
Open anaconda prompt and type
jupyter notebook --generate-config
then go to "jupyter_notebook_config.py" path and add following line
c.NotebookApp.browser = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
Easy steps: 1. Uninstall the current browser which notebook picks on launch. 2. Launch the notebook again, it will ask for browser: choose the required one and enable the clause which says : (something like) Always choose this application for this types of files.
It will work. Install back you uninstalled browser.
The following also works for me. I give it a full path to chrome, plus %s
at the end.
jupyter notebook --browser='C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
If chrome is in the PATH environment variable, the following might work too.
jupyter notebook --browser=chrome
Microsoft have setup Edge as a persistent virus on Windows. Even if you set the default browser to Chrome in Settings, you still get edge when opening up Jupyter.. This is because Microsoft have set Edge as the default app for .htm and .html files. In the settings for app defaults, find that one and change it to Chrome and you are all set..