1 首先可能因为缺少ehcarts的地图扩展包,需要手动安装
#中国省份地图包
pip install echarts-china-provinces-pypkg
#中国城市地图包
pip install echarts-china-cities-pypkg
pip install echarts-china-counties-pypkg
pip install echarts-china-misc-pypkg
pip install echarts-united-kingdom-pypkg
最终要显示successfully installed <包名>
2 查看当前pyecharts的版本号
pip show pyecharts
运行python会出现一些pyecharts的信息:
可以看出此版本已是1.v以后版本,该版本渲染图片语法与之前不同,需要在内部画图中引用render_系列渲染图像,如官网例子所示:
如果在c变量括号之外渲染,就会导致echarts图像加载不成功。
成功显示图像: