1. 程式人生 > >Windows下jupyter notebook 修改開啟的瀏覽器

Windows下jupyter notebook 修改開啟的瀏覽器

1. 開啟cmd,輸入jupyter notebook --generate-config

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,你就會發現啟動了相應的瀏覽器。

完成!