我刚刚使用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/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'
有帮助吗? 谢谢!