ANKAN MAZUMDAR
ANKAN MAZUMDAR

Reputation: 39

In order to set chrome as default browser for jupyter , i'm getting error while running config file- jupyter_notebook_config.py

I'm trying to set chrome as default browser for launching jupyter notebook. For this i'm following the usual steps-

  1. In anaconda prompt, i fired- jupyter notebook --generate-config ,a config file 'jupyter_notebook_config.py' is created.
  2. Opened the file in notepad & change the line # c.NotebookApp.browser = '' to c.NotebookApp.browser = u'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
  3. Saved the file & run the file, got an error, PF the Screenshot- error

Traceback (most recent call last): File "jupyter_notebook_config.py", line 99, in c.NotebookApp.browser = u'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe %s' NameError: name 'c' is not defined

Can anyone please let me know what is object c here, which class it invokes?

Upvotes: 0

Views: 1890

Answers (2)

Boomer
Boomer

Reputation: 239

In windows 10 - Goto file explorer - browse to C:\Users\your user name\AppData\Roaming\jupyter\runtime. Locate the nbserver-####-open.html files. Right click anyone of them. Select Properties (at bottom). With popup window, choose OPEN WITH: change button (at top) and select browser of your choice.

Upvotes: 3

Partha Mandal
Partha Mandal

Reputation: 1441

Why are you running python jupyter_notebook_config.py?

You are supposed to run jupyter notebook in the console. and jupyter should ideally read off the config, and you should get something like :

The Jupyter Notebook is running at:
[I 03:33:00.085 NotebookApp] http://localhost:8888/?token=...

Upvotes: 1

Related Questions