jupyter notebook无法自动打开浏览器
安装anaconda后点击jupyter notebook只弹出上图所示的窗口,而不自动打开浏览器。
针对此问题的解决办法如下:
1.在cmd窗口输入:
jupyter notebook --generate-config
得到如下图所示的结果,根据路径找到对应的jupyter_notebook_config.py文件并打开。
2.在jupyter_notebook_config.py中的第99行左右找到这一行:#c.NotebookApp.browser = ‘’
在下面加上
import webbrowser
webbrowser.register("chrome",None,webbrowser.GenericBrowser(r"C:\Users\南\AppData\Local\CentBrowser\Application\chrome.exe"))
c.NotebookApp.browser = 'chrome'
其中“Chrome”是默认使用的浏览器。
注意路径前加“r”(如果是单\的话)。
3.保存关闭之后,重新点击jupyter notebook即可。