【问题标题】:Pygal import failurePygal 导入失败
【发布时间】: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'
>>>

【问题讨论】:

标签: python pygal


【解决方案1】:

您的路径中有一个名为“pygal.py”的文件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-04-07
    • 2018-03-17
    • 2020-03-04
    • 2014-03-28
    • 2016-07-14
    • 2018-06-07
    • 2017-06-14
    • 2021-03-29
    相关资源
    最近更新 更多