Windows下jupyter notebook 修改打开的浏览器

时间:2023-02-11 07:10:10

1. 打开cmd,输入jupyter notebook --generate-config

Windows下jupyter notebook 修改打开的浏览器

2. 根据返回的路径打开 C:\Users\Administrator\.jupyter\jupyter_notebook_config.py文件

3. 在文件中任意位置添加:

import webbrowser webbrowser.register('2345Explorer', None, webbrowser.GenericBrowser(u'D:\\Program Files (x86)\\2345Soft\\2345Explorer\\2345Explorer.exe')) c.NotebookApp.browser = '2345Explorer'

其中GenericBrowser里的参数是你安装的浏览器的路径

设置好之后在cmd里输入 jupyter notebook,你就会发现启动了相应的浏览器。

完成!