马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
电脑win10 64 Python3.7 重新pip显示如下 Requirement already satisfied: pyecharts in c:\users\rsj03\appdata\local\programs\python\python37\lib\site-packages (1.7.1) Requirement already satisfied: simplejson in c:\users\rsj03\appdata\local\programs\python\python37\lib\site-packages (from pyecharts) (3.17.0) Requirement already satisfied: jinja2 in c:\users\rsj03\appdata\local\programs\python\python37\lib\site-packages (from pyecharts) (2.11.1) Requirement already satisfied: prettytable in c:\users\rsj03\appdata\local\programs\python\python37\lib\site-packages (from pyecharts) (0.7.2) Requirement already satisfied: MarkupSafe>=0.23 in c:\users\rsj03\appdata\local\programs\python\python37\lib\site-packages (from jinja2->pyecharts) (1.1.1)
Pip list能查到安装好的pyecharts如下 pyecharts 1.7.1 pyecharts-jupyter-installer 0.0.3
网上教程的代码,这个代码白天在单位电脑是可以运行的,在家的这台电脑就报错。 from pyecharts.charts import Bar
from pyecharts import options as opts
bar = Bar()
x = list(range(1, 6))
y = [111, 120, 130, 142, 150]
bar.add_xaxis(x)
bar.add_yaxis("商家A", y)
bar.set_global_opts(title_opts=opts.TitleOpts(title='基本标题', subtitle='副标题'))
bar.render(r'C:\Users\rsj03\Desktop\hello.html')
报错如下:Traceback (most recent call last): File "C:/Users/rsj03/Desktop/pyecharts.py", line 1, in <module> from pyecharts.charts import Bar File "C:\Users\rsj03\Desktop\pyecharts.py", line 1, in <module> from pyecharts.charts import BarModuleNotFoundError: No module named 'pyecharts.charts'; 'pyecharts' is not a package
不知道是哪里出了问题? 帮忙看下。 感谢各位!
|