admin管理员组

文章数量:1291337

1.2 jupyter notebook 浏览器打开空白

 

jupyter notebook 需要用谷歌浏览器打开才可以,其他的浏览器打开后多半是空白的。添加默认浏览器如下:

1.在anaconda prompt 里面直接输入

jupyter notebook --generate-config

让jupyter生成一个配置文件,生成后你会看到文件地址的

 

2.然后就可以使用记事本之类的,打开这个jupyter_notebook_config.py文件

然后查找,browser,找到如下代码:

## Specify what command to use to invoke a web browser when opening the notebook.
#  If not specified, the default browser will be determined by the `webbrowser`
#  standard library module, which allows setting of the BROWSER environment
#  variable to override it.
#c.NotebookApp.browser = u''

在这个后面,添加google浏览器

 

 
  1. import webbrowser

  2. webbrowser.register('chrome', None, webbrowser.GenericBrowser(u'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'))

  3. c.NotebookApp.browser = 'chrome'

 

本文标签: 空白浏览器jupyterNOTEBOOK