启动jupyter notebook后,浏览器是空白的??

版权声明:仅用于个人学习,分享收获。 https://blog.csdn.net/qq_33431972/article/details/87950962

win7 64位
已装anaconda
已装Google Chrome

解决方法:
1.anaconda prompt 中输入:
jupyter notebook --generate-config
生成一个配置文件,看到文件地址的

2.根据位置打开这个jupyter_notebook_config.py文件
找到如下代码:

## 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''

在这段代码后面加上

import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser(u'这是chrome的位置+名'))
c.NotebookApp.browser = 'chrome'

在这里插入图片描述
ok,保存,再次运行jupyter notebook

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_33431972/article/details/87950962