问题描述
我是python的新手,我正在尝试在线学习.我尝试在 python 3.6 上导入 matplotlib,但我不断收到此错误:
I am a newbie to python and i am trying to learn online. I tried importing matplotlib on python 3.6 but i keep getting this error:
问题-AttributeError:模块'numbers'没有属性'Integral'.
problem in matplotlib - AttributeError: module 'numbers' has no attribute 'Integral'.
我正在使用 Anaconda.我也安装了 matplotlib 库.我不知道发生了什么事.请帮忙.
I am using Anaconda. and i have installed the matplotlib library too. I have no idea what is going on. Please help.
推荐答案
正如您在评论中告诉我们的那样,您的文件名为Numbers.py.这个文件可能是问题所在,因为它隐藏了 matplotlib 使用的 numbers.py 文件.您的 numbers.py 文件不提供 Integral 属性,因此是错误消息.解决方案:重命名您的文件.
As you told us in your comment, your file is named numbers.py. This file is probably the problem, as it hides the numbers.py file used by matplotlib. Your numbers.py file does not provide the Integral attribute, thus the error message.Solution: Rename your file.
这篇关于matplotlib-AttributeError:模块'numbers'没有属性'Integral'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!