看代码是v1版本的还是v0.5(旧版本),发现是v1卸载pyecharts pip uninstall pyecharts - - y 重新安装新版本的pyecharts pip install pyecharts 之后就可以顺利运行代码。