On my Windows PC, i have anaconda installed and when I open a jupyter notebook, it opens up in internet explorer, but I would like to use Chrome instead. Does anyone know how to achieve this?
To launch Jupyter Notebook App: Click on spotlight, type terminal to open a terminal window. Enter the startup folder by typing cd /some_folder_name . Type jupyter notebook to launch the Jupyter Notebook App The notebook interface will appear in a new browser window or tab.
Windows File Explorer + Command Prompt Once you've entered your specific folder with Windows Explorer, you can simply press ALT + D, type in cmd and press Enter. You can then type jupyter notebook to launch Jupyter Notebook within that specific folder.
With this Jupyter lab distribution, you do not need to run jupyter notebook command in your terminal anymore to launch your notebook. It completely runs on a web browser, without having any dependency of installations on the end user device.
If you haven't already, create a notebook config file by running
jupyter notebook --generate-config
Then, edit the file jupyter_notebook_config.py
found in the .jupyter
folder of your home directory.
You need to change the line # c.NotebookApp.browser = ''
to c.NotebookApp.browser = 'C:/path/to/your/chrome.exe %s'
On windows 10, Chrome should be located C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
but check on your system to be sure.
Just make chrome as a default browser and launch the jupyter . It will work
To Make Google chrome a default browser , follow steps
Google Chrome
.command
or anaconda prompt
and type jupyter notebook
as usual. A new jupyter notebook tab should open in Google Chrome now.
For those who still have trouble launching Chrome automatically from cmd, try replacing
# c.NotebookApp.browser =''
in the file jupyter_notebook_config.py
with
import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser('C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser = 'chrome'
or the appropriate location, there shouldn't be need to install anything via pip.
Ref: https://support.anaconda.com/customer/en/portal/articles/2925919-change-default-browser-in-jupyter-notebook
Create and edit the jupyter notebook config file with the following steps:
jupyter notebook --generate-config
notepad path_to_file/jupyter_notebook_config.py
to open it (change path_to_file
)#c.NotebookApp.browser = ''
to c.NotebookApp.browser = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
Jupyter notebook will now use Chrome.
EDIT
In Windows 10 I had to type
notepad .jupyter/jupyter_notebook_config.py
And substitute the line with
c.NotebookApp.browser = 'C:/Program Files/Google/Chrome/Application/chrome.exe %s'
step1: Go to search menu of windows and type default app.
step 2: go to WEB BROWSER title and change it to Google Chrome.
step3: Go to search menu of windows and type jupyter notebook
This will open the jupyter notebook in Google Chrome
Take any html file on your computer and set the default browser to open html files to chrome. This will automatically open jupyter notebook with chrome. Worked for me.
I found an easier solution that may help beginners to coding.
go to
C:\Users\'-your user-'\AppData\Roaming\jupyter\runtime
and find a file named
nbserver-6176-open.html
then
Right-click > open with > Choose default program...
Here, what ever you choose would be saved on your Windows to open all HTML files; therefore when you run Jupyter notebook, it would open in the program you want.
--generate-config
command on the anaconda prompt. jupyter_notebook_config.py
file. Find the c.NotebookApp.Browser like this:
c.NotebookApp.browser = 'c:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
Works on mine.
For windows set the default browser to open html files to Chrome. Configuration > Default Apps > Default Apps by File Type. Worked for me.
You don't have to change anything in the jupyter config code, you just have to make Chrome as your default browser in the setting. Jupyter opens whichever is the default.
For some reason Louise's answer didn't work for me I had to:
-Open anaconda prompt and generate the config file for Jupyter: jupyter notebook --generate-config
-Open the newly created config file at: C:\Users\builder\.juptyer\jupyter_notebook_config.py
-Add the following to the file:
import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser(r'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser = 'chrome'
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