我的编程用的是python2.7,模块pygal1.7.0,pygal2.0也试过,编辑器是pycharm,
我的程序:
# /usr/bin/evn python
# encoding:utf-8
import pygal
list_02 = [1, 2, 2, 3, 4]
huatu = pygal.Bar()
huatu.add('tubiao', list_02)
huatu.render_to_file(r'C:\Users\liliangce1\Desktop\tupian.svg')
报告的问题:
Traceback (most recent call last):
File "D:/workspace/python/mydog/biancheng.py", line 8, in
huatu = pygal.Bar()
AttributeError: 'module' object has no attribute 'Bar'
求各位老师解惑。
另附
(c) 2012 Microsoft Corporation。
C:\Users\liliangce1>python
Python 2.7.8 (default, Jun 30 20
Type "help", "copyright", "credi
>>> import pygal
>>> pygal.Bar
>>>