You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.
Mac通过pip安装pyecharts, sudo pip install pyecharts -U
然后通过 pip list | grep pyecharts,看到下边确实有这个模块
pyecharts 1.0.0
运行demo的代码,报错如下
Traceback (most recent call last):
File "exercise_10.py", line 3, in
from pyecharts.charts import Bar
File "/Library/Python/2.7/site-packages/pyecharts/init.py", line 3, in
from pyecharts import charts, commons, components, datasets, options, render, scaffold
File "/Library/Python/2.7/site-packages/pyecharts/charts/init.py", line 4, in
from ..charts.basic_charts.bar import Bar
File "/Library/Python/2.7/site-packages/pyecharts/charts/basic_charts/bar.py", line 15
def init(self, init_opts: Union[opts.InitOpts, dict] = opts.InitOpts()):
^
SyntaxError: invalid syntax
请问大神们是什么问题啊?demo 代码如下
from pyecharts.charts import Bar
from pyecharts import options as opts
Mac通过pip安装pyecharts, sudo pip install pyecharts -U
然后通过 pip list | grep pyecharts,看到下边确实有这个模块
pyecharts 1.0.0
运行demo的代码,报错如下
Traceback (most recent call last):
File "exercise_10.py", line 3, in
from pyecharts.charts import Bar
File "/Library/Python/2.7/site-packages/pyecharts/init.py", line 3, in
from pyecharts import charts, commons, components, datasets, options, render, scaffold
File "/Library/Python/2.7/site-packages/pyecharts/charts/init.py", line 4, in
from ..charts.basic_charts.bar import Bar
File "/Library/Python/2.7/site-packages/pyecharts/charts/basic_charts/bar.py", line 15
def init(self, init_opts: Union[opts.InitOpts, dict] = opts.InitOpts()):
^
SyntaxError: invalid syntax
请问大神们是什么问题啊?demo 代码如下
from pyecharts.charts import Bar
from pyecharts import options as opts
bar = (
Bar()
.add_xaxis(["衬衫", "毛衣", "领带", "裤子", "风衣", "高跟鞋", "袜子"])
.add_yaxis("商家A", [114, 55, 27, 101, 125, 27, 105])
.add_yaxis("商家B", [57, 134, 137, 129, 145, 60, 49])
.set_global_opts(title_opts=opts.TitleOpts(title="某商场销售情况"))
)
bar.render()
The text was updated successfully, but these errors were encountered: