您的位置:首页 > 其它

1.2 jupyter notebook 浏览器打开空白

2017-10-30 09:32 706 查看
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浏览器
import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser(u'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser = 'chrome'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: