Python matplotlib错误:来自检查导入参数ImportError:无法导入名称';参数';
我刚刚用Anaconda安装了matplotlib,因为我需要绘制一个图表。我刚导入了它,我写下:Python matplotlib错误:来自检查导入参数ImportError:无法导入名称';参数';,python,matplotlib,Python,Matplotlib,我刚刚用Anaconda安装了matplotlib,因为我需要绘制一个图表。我刚导入了它,我写下: import matplotlib.pyplot as plt fig = plt.figure() fig.suptitle("Error rates / tree depth") fig, ax_lst = plt.subplots(2,2) 当我运行该文件时,它会显示: Traceback (most recent call last): File "/Users/xxxxxxxx/D
import matplotlib.pyplot as plt
fig = plt.figure()
fig.suptitle("Error rates / tree depth")
fig, ax_lst = plt.subplots(2,2)
当我运行该文件时,它会显示:
Traceback (most recent call last):
File "/Users/xxxxxxxx/Documents/xxxxxxx/ASSIGNMENTS/hw2/handout/decisionTree_working_not_cleaned.py", line 5, in <module>
import matplotlib.pyplot as plt
File "/Users/xxxxxxxxxxx/anaconda3/envs/ML35/lib/python3.5/site-packages/matplotlib/__init__.py", line 125, in <module>
from inspect import Parameter
ImportError: cannot import name 'Parameter'
回溯(最近一次呼叫最后一次):
文件“/Users/xxxxxxx/Documents/xxxxxxx/ASSIGNMENTS/hw2/handout/decisionTree\u working\u not\u cleanned.py”,第5行,在
将matplotlib.pyplot作为plt导入
文件“/Users/xxxxxxxxxx/anaconda3/envs/ML35/lib/python3.5/site packages/matplotlib/__init__u;.py”,第125行,在
从检查导入参数
ImportError:无法导入名称“参数”
有什么帮助吗?
谢谢 如果您命名了一个文件
inspect.py
,请选择一个不同的名称。其他可能的情况:可能您使用的是一个非常糟糕的Python 2环境,或者您编辑了不应该使用的标准库文件。