jupyter notebook 设置默认浏览器打开

刚刚在运行jupyter notebook的时候居然跳到了PyCharm里面,没有按照预计的打开浏览器运行。为了后面方便使用,配置了一个运行时默认chrome打开。
在cmd黑窗口中敲命令 jupyter notebook --generate-config
找到配置文件后,在文件任意位置添加一下代码:

import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser(u'C:\\Users\wang\AppData\Local\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser = 'chrome'

配置好之后再次到cmd中 运行 jupyter notebook 命令。
大功告成==

你可能感兴趣的:(数据分析,jupyter,notebook)