【发布时间】:2016-02-16 00:09:49
【问题描述】:
面临一个奇怪的问题。导入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'
>>>
【问题讨论】:
-
stackoverflow.com/questions/30045872/… 我在同一路径中有一个文件名 pygal.py
-
您可以回答您的问题,然后将其标记为正确答案。