1.2 jupyter notebook 浏览器打开空白

来源:互联网 发布:php短信轰炸机 编辑:程序博客网 时间:2024/05/21 06:49

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'

或者添加猎豹
import webbrowser
webbrowser.register('liebao', None, webbrowser.GenericBrowser(u'D:\software\liebao\liebao.exe'))
c.NotebookApp.browser = 'liebao'
当然用猎豹浏览器,jupyter notebook 打开后一片空白的。


原创粉丝点击