Giter Club home page Giter Club logo

pyecharts-app's Issues

mac无法导入pyecharts

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()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.