1、生成配置文件
打开Anaconda Prompt 命令窗口,进入base环境,输入:jupyter notebook --generate-config 回车;
生成了jupyter notebook 配置文件:jupyter_notebook_config.py


2、修改配置文件
根据前面命令窗提供的路径,用txt打开上述配置文件;
并查找“c.NotebookApp.browser”
在其中增加如下代码,其中有X部分*(图中红色下划线部分)是用户根据自指定的浏览器名称及路径信息:
import webbrowser
webbrowser.register('XXXX',None,webbrowser.GenericBrowser(u'XXXXX'))
c.NotebookApp.browser = u'XXXX'

我指定的是Microsoft 的edge浏览器,具体信息如下:

网友评论