Jupyter notebook 打开IE浏览器之后显示空白页面

解决方法:修改打开的浏览器

看到有人提供的解决方案为降低jupyter的版本,试了一下,不行,用下面的方法可以:

在 C:\Users\用户名.jupyter\ 路径下找到 jupyter_notebook_config.py
若路径下无此文件,则在命令行通过以下命令生成:

jupyter notebook --generate-config

右键点击此文件通过IDLE/记事本打开,然后查找,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''

在此代码块后添加如下代码,将chrome设置为jupyter notebook默认浏览器:

import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser(u'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser = 'chrome'

上面代码中的路径要改为自己chrome.exe文件所在的路径

发布了23 篇原创文章 · 获赞 26 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/menghuanshen/article/details/104136463
今日推荐