Jupyter notebook打开空白页问题

用pip安装了jupyter,但是执行命令jupyter notebook,打开的IE浏览器是空白页。网友给出的方法一般如下:

第一步:执行命令 jupyter notebook --generate-config,得到jupyter配置文件地址。

第二步:Overwrite C:\Users\Administrator\.jupyter\jupyter_notebook_config.py with defaul
t config? [y/N],按照运行得到的地址,打开配置文件

找到如下代码(95-99行):

## 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 = ''
在下面,增加如下代码:

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

C:\Program Files (x86)\Google\Chrome\Application\chrome.exe是我电脑谷歌浏览器的地址,可以根据自己的喜好配置浏览器,保存并退出。

再次运行jupyter notebook,我发现并没有打开所设置的谷歌浏览器,但是运行结果如下:

但是可以看到绿框中的描述,可以把通过复制到浏览器打开。于是不嫌麻烦的我把红框中的地址+token右键标记,然后粘贴到浏览器就OK了,这也是我每次运行jupyter的方式。。。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值