簡(jiǎn)單處理方法: 不能自動(dòng)跳轉(zhuǎn),那我們手動(dòng)復(fù)制黑框最下面的一行url網(wǎng)址到瀏覽器地址欄來(lái)打開(kāi),
復(fù)雜處理方法如下:
1、找到anaconda下的anaconda prompt并打開(kāi)
2、在anaconda prompt里面輸入:jupyter notebook --generate-config
回車后會(huì)生成一個(gè)配置文件jupyter_notebook_config.py,會(huì)提示該文件所在的目錄,我的在:C:/user/.jupyter下面。
3、找到并打開(kāi)這個(gè)文件,需要在這個(gè)文件設(shè)置默認(rèn)瀏覽器處增加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 = ''
在下面,增加如下代碼:
#(備注:其中'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'是谷歌瀏覽器位置.)
import webbrowser
webbrowser.register('chrome',None, webbrowser.GenericBrowser(u'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'))
c.NotebookApp.browser ='chrome'
可能有人會(huì)說(shuō)不知道谷歌瀏覽器位置啊,這樣找谷歌瀏覽器位置
將谷歌瀏覽器發(fā)送至桌面快捷方式,然后右鍵點(diǎn)擊屬性,沒(méi)錯(cuò)就是里面‘目標(biāo)’后面的那一坨??!
保存增加的代碼,收工。
然后再次打開(kāi)jupyter notebook會(huì)發(fā)現(xiàn)可以從谷歌瀏覽器中打開(kāi)了。








暫無(wú)數(shù)據(jù)