一瑟慈、如何修改打開的文件夾和瀏覽器:
1、用記事本打開C:\Users\Tom\.jupyter\jupyter_notebook_config.py
2屋匕、查找## The directory to use for notebooks and kernels.修改為:
## The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = 'E:\數(shù)據(jù)恢復(fù)\教程\PYTHON'
3封豪、查找#c.NotebookApp.browser = ''并且換行之后再增加四行代碼:
#c.NotebookApp.browser = ''
import webbrowser
webbrowser.register("msedge",None,webbrowser.GenericBrowser(u"C:\Program Files (x86)\Microsoft\Edge Dev\Application\msedge.exe"))
c.NotebookApp.browser = 'msedge'
4、最終生效還要修改快捷方式的目標(biāo):刪除最后的"%USERPROFILE%/"炒瘟,否則只能更改瀏覽器,打開文件夾仍為C:\Users\Tom
以下為jupyter notebook修改前后的快捷方式的目標(biāo):
D:\Anaconda3_2019.03\python.exe D:\Anaconda3_2019.03\cwp.py D:\Anaconda3_2019.03 D:\Anaconda3_2019.03\python.exe D:\Anaconda3_2019.03\Scripts\jupyter-notebook-script.py "%USERPROFILE%/"
D:\Anaconda3_2019.03\python.exe D:\Anaconda3_2019.03\cwp.py D:\Anaconda3_2019.03 D:\Anaconda3_2019.03\python.exe D:\Anaconda3_2019.03\Scripts\jupyter-notebook-script.py
以下為jupyter lab修改前后的快捷方式的目標(biāo):
D:\Anaconda3_2019.03\python.exe D:\Anaconda3_2019.03\cwp.py D:\Anaconda3_2019.03 D:\Anaconda3_2019.03\python.exe D:\Anaconda3_2019.03\Scripts\jupyter-lab-script.py "%USERPROFILE%/"
D:\Anaconda3_2019.03\python.exe D:\Anaconda3_2019.03\cwp.py D:\Anaconda3_2019.03 D:\Anaconda3_2019.03\python.exe D:\Anaconda3_2019.03\Scripts\jupyter-lab-script.py
二第步、安裝anaconda后疮装,jupyter lab本來沒有快捷方式缘琅,可以根據(jù)jupyter notebook的快捷方式自己做一個。
1廓推、對比上面的快捷方式目標(biāo)可以看出刷袍,修改一處即可做出jupyter lab的快捷方式:
將D:\Anaconda3_2019.03\Scripts\jupyter-notebook-script.py修改成D:\Anaconda3_2019.03\Scripts\jupyter-lab-script.py即可。(jupyter-lab-script.py這個文件在對應(yīng)路徑的文件夾中可以找到)
2樊展、將jupyter notebook的快捷方式的副本進行修改呻纹,更改名稱和目標(biāo)即可。