原因分析:由于國外的js源無法訪問而無法出圖,改為本地js源解決問題
1.從gitee下載js源文件
? ? git clone https://gitee.com/extraline/pyecharts-assets.git
2.拷貝assets目錄到jupyter 外部源地址 如/notebook/assets
3.修改jupyter notebook的配置文件~/.jupyter/jupyter_notebook_config.py的外部源地址
? ? c.NotebookApp.extra_static_paths = ['/notebook/assets/']
4.驗證通過juypter notebook能訪問到js,不能訪問檢查jupyter配置
? ?127.0.0.1:8888/static/echarts.min.js
5.修改ipynb文件,在導入pyechart前修改配置本地源
? ? from pyecharts.globals import CurrentConfig, NotebookType
? ? CurrentConfig.ONLINE_HOST = "static/"