1. 程式人生 > >jupyter notebook安裝與配置

jupyter notebook安裝與配置

jupyter notebook是一個非常好用工具,和ipython有點類似,但是比ipython使用起來更加方便。

在我們安裝完成Python之後,可以使用pip命令進行安裝,具體如下:

pip install jyputer notebook

jupyter notebook安裝與配置

安裝完成之後執行:jupyter notebook,如下圖:
jupyter notebook安裝與配置

瀏覽器中開啟地址如下圖:
jupyter notebook安裝與配置

在開始之前我們配置工作目錄:
命令列輸入: jupyter notebook --generate-config 生成配置檔案
jupyter notebook安裝與配置
開啟檔案,設定工作目錄:
jupyter notebook安裝與配置
結果如下:
jupyter notebook安裝與配置
重新啟動Jupyter,結果如下:
jupyter notebook安裝與配置
建立一個工作目錄與Python檔案,執行結果如下:
jupyter notebook安裝與配置


如果我們想要在另一臺電腦訪問頁面,啟動Jupyter時需要新增IP地址,如下:
jupyter notebook安裝與配置
在另一臺電腦使用瀏覽器開啟這個地址就可以使用了。
到這裡,Jupyter基本配置就完成了,使用就比較簡單,大家嘗試操作幾次就能掌握。