Python學習之Jupyter Notebook和highchart安裝
阿新 • • 發佈:2018-12-17
執行環境
Win10 64位 + Python3.6.0
一、安裝網頁端編譯器Jupyter Notebook
- 在cmd輸入
pip3 install jupyter
- 在cmd輸入
jupyter notebook
,啟動jupyter notebook,然後會跳轉到網頁,網頁上顯示了本地的Python檔案,這樣就啟動成功了
二、安裝highchart庫
- 在cmd輸入
pip3 install charts
,highchart庫就安裝成功了 - 啟動jupyter notebook,在網頁中選擇new\python3,在新頁面輸入
import charts
,點選cell>run,或者shift+enter,會報錯。
這時需要兩步: 1.找到charts所在檔案目錄,一般在Python安裝目錄下的site-packages資料夾下,或者在jupyter notebook下輸入
import sys
print(sys.path)
可以看到安裝路徑如下圖
2.找到site-packages檔案路徑,開啟charts資料夾,將charts檔案下的7個檔案替換,在Jupyter Notebook中輸入import charts
,出現下圖所示即成功。
替換檔案地址:替換檔案