美文网首页呆鸟的Python数据分析
pyecharts安装后import错误 ImportError

pyecharts安装后import错误 ImportError

作者: 还少一双小脚丫 | 来源:发表于2018-10-12 22:29 被阅读644次

走过的坑

https://blog.csdn.net/weixin_38722426/article/details/82792321,里面让安装0.1.9.4版本,然而[官网](https://github.com/pyecharts/pyecharts) 已经出到了0.5.11,怎能容忍

正确道路

于是怀疑是否为pyecharts_snapshot模块出现的问题,官网下载pyecharts_snapshot 安装

image

尝试导入试试

image

OK!


from pyechartsimport Bar

bar= Bar("我的第一个图表","这里是副标题")

bar.add("服装", ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"], [5,20,36,10,75,90])

# bar.print_echarts_options() # 该行只为了打印配置项,方便调试时使用

bar.render()

测试结果

image

相关文章

网友评论

    本文标题:pyecharts安装后import错误 ImportError

    本文链接:https://www.haomeiwen.com/subject/hornaftx.html