How to change the default browser used by jupyter notebook in windows

  • 9 months ago
Comment

ChatGPT
1 / 1

To change the default browser used by Jupyter Notebook in Windows, you can modify the Jupyter configuration. Here's how you can do it:

  1. Open the Command Prompt or Anaconda Prompt.

  2. Run the following command to generate a Jupyter Notebook configuration file if you haven't already:

    arduino
    jupyter notebook --generate-config
  3. Locate the generated Jupyter configuration file. It is usually located at C:\Users\<username>\.jupyter\jupyter_notebook_config.py.

  4. Open the Jupyter configuration file in a text editor.

  5. Search for the line that begins with # c.NotebookApp.browser = ''.

  6. Uncomment the line by removing the # at the beginning and set the browser executable path within the single quotes. For example, if you want to use Google Chrome, you might have:

    python
    c.NotebookApp.browser = 'C:/Program Files/Google/Chrome/Application/chrome.exe %s'

    Replace the path with the actual path to the browser executable on your system.

  7. Save the configuration file.

  8. Now when you start Jupyter Notebook, it should open in the browser you specified.

Remember that browser paths may vary depending on your system configuration and installed applications. Also, make sure to provide the correct path to the browser executable.

After making these changes, you may need to restart Jupyter Notebook for the new browser setting to take effect.