jupyter notebook 的默认起始位置和默认浏览器修改

打不开浏览器/时间很久的解决办法:

    当第一次点luanch的时候会出现无法弹出浏览器的情况,需要打开目录C:\Users\Administrator\.jupyter
    也可以通过如下命令查找
    (base) C:\Users\Administrator>jupyter notebook --generate-config
    Writing default config to: C:\Users\Administrator\.jupyter\jupyter_notebook_config.py

    并修改jupyter_notebook_config.py在文末添加如下内容(首行不要有缩进):

    import webbrowser
    webbrowser.register('chrome',None, webbrowser.GenericBrowser(u'C:\Program Files\Google\Chrome\Application\chrome.exe'))
    c.NotebookApp.browser ='chrome'
    c.NotebookApp.notebook_dir = 'F:\jupyter'

 

posted @ 2023-11-11 06:47  一叶菩提一粒尘  阅读(107)  评论(0编辑  收藏  举报