Try   HackMD
tags: Jupyter

深度學習開始 - jupyter 預設瀏覽器 & 預設路徑更改

預設瀏覽器,更改為Chrome

  1. 開啟 Anaconda Prompt

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  2. 輸入 $ jupyter notebook generate-config
    這邊我的config 檔案已經存在,會問我要不要覆蓋。我的已經修改好了,不需要覆蓋。

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  3. 隨著路徑找到該jupyter_notebook_config檔案,用文字檔notebook 開啟,找到
    #c.NotebookApp.browser = ''
    修改成以下:

import webbrowser

webbrowser.register("chrome",None,webbrowser.GenericBrowser(u"C:\\ProgramFiles(x86)\\Google\\Chrome\\Application\\chrome.exe"))

c.NotebookApp.browser = 'chrome'

其中Chrome 路徑是你自己安裝Chrome的路徑,最好檢查一下是否正確,不要直接複製貼上了XD。

預設路徑更改 專屬 jupyter 的資料夾

  1. 一樣在jupyter_notebook_config檔案,找到
    #c.NotebookApp.notebook_dir = ''
    修改成以下
c.NotebookApp.notebook_dir = 'C:\Jupyter'

其中 C:\Jupyter 須先建立好檔案夾,不然會執行error。