【发布时间】:2021-06-05 08:12:35
【问题描述】:
我刚开始使用 MatPlotLib,我试图打印出版本号。
这是我的代码:
import matplotlib
print(matplotlib.__version_)
但是,当我运行它时出现错误:
Traceback (most recent call last):
File "c:/Users/Atharv 2020/Pyfiles/matplotlib.py", line 1, in <module>
import matplotlib
File "c:\Users\Atharv 2020\Pyfiles\matplotlib.py", line 2, in <module>
print(matplotlib.__version_)
AttributeError: partially initialized module 'matplotlib' has no attribute '__version_' (most likely due to a circular import)
你能帮帮我吗?
【问题讨论】:
-
@dm2 是的!我已将您的答案作为评论发布。
标签: python matplotlib attributeerror