Pygal导入失败

时间:2016-02-16 00:09:50

标签: python pygal

面对一个奇怪的问题。导入pygal是成功的。但是无法使用它。 下面是一个Ubuntu。在我的mac工作中也是如此。

感谢您的帮助!

Python 2.7.6 (default, Jun 22 2015, 18:00:18)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygal
>>>
>>> pygal.Line()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Line'
>>> pygal.Line
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Line'
>>> pygal.Bar()`enter code here`
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Bar'
>>>

1 个答案:

答案 0 :(得分:0)

你有一个名为&#39; pygal.py&#39;的文件。在你的道路上。