学习python的表格pyecharts

看了一篇文章。pyecharts快速入门
https://blog.csdn.net/j123__/article/details/82830698

照着敲了一遍,发现走不通。
ERROR:lml.utils:failed to import pyecharts_snapshot
Traceback (most recent call last):
File “E:\py\lib\site-packages\lml\utils.py”, line 43, in do_import
plugin_module = import(plugin_module_name)
ModuleNotFoundError: No module named ‘pyecharts_snapshot

程序报错。上网查,大多是教大家怎么用的,很少讨论报错的事。

其实仔细看内容还是能看到的,是安装不完全。但是我都安装了pyecharts,为啥不完全啊!!!?
pip install pyecharts

结果不是这样的,其实pyecharts安装之后,还要安装两个东西。
pip install pyecharts_snapshot
pip install wheel

安装完成之后,程序跑通了。

还有个问题,不指定目录的话,也就是下边括号里空的话。
是你的程序存在哪里,就生成一个html文件,
bar.render()

名字叫render,双击会打开浏览器,就能看到你的表格了。
在这里插入图片描述
另外网上的各种案例,都是速成的。建议新手从基础学起,我用的是MOOC的内容,北京大学的课程比较基础,但是很扎实。体系比较好。
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_42952688/article/details/86549264