浩晨众云网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
这篇文章主要讲解了Jupyter notebook指定浏览器打开的实现方法,内容清晰明了,对此有兴趣的小伙伴可以学习一下,相信大家阅读完之后会有帮助。
电脑中装了Firefox和Chrome浏览器,系统默认浏览器是Chrome,希望每次运行Jupyter在Firefox浏览器,而不是系统默的Chrome.
进入cmd,执行jupyter notebook --generate-config,生成jupyter notebook配置文件。
如果jupyter notebook配置文件已经存在,可以在C:\Users\用户名\.jupyter找到文件jupyter_notebook_config.py
打开jupyter_notebook_config.py文件,搜索c.NotebookApp.browser
将#c.NotebookApp.browser = ''修改代码如下
import webbrowser webbrowser.register( "Firefox", None, webbrowser.GenericBrowser("C:/Program Files/Mozilla Firefox/firefox.exe")) c.NotebookApp.browser = "Firefox"