1、找到anaconda下的anaconda prompt並打開(或者CMD)都可以
2、在anaconda prompt里面輸入:jupyter notebook --generate-config
回車后會生成一個配置文件jupyter_notebook_config.py,會提示該文件所在的目錄。
3、找到並打開這個文件,需要在這個文件設置默認瀏覽器處增加Chrome,找到如下代碼(95-99行):
## Specify what command to use to invoke a web browser when opening the notebook.
# If not specified, the default browser will be determined by the `webbrowser`
# standard library module, which allows setting of the BROWSER environment
# variable to override it.
#c.NotebookApp.browser = ''
在下面,增加如下代碼:
importwebbrowser
webbrowser.register('chrome',None, webbrowser.GenericBrowser(u'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser ='chrome'