错误提示:Matplotlib 3.6 and will be removed two minor releases later如何解决
源代码:
from tensorflow import keras fashion_mnist=keras.datasets.fashion_mnist (train_images,train_labels),(test_images,test_labels)=fashion_mnist.load_data() from matplotlib import pyplot as plt # plt.plot(train_images[0]) # plt.grid(True) plt.imshow(train_images[0]) plt.show()
运行之后报错:
MatplotlibDeprecationWarning: Support for FigureCanvases without a required_interactive_framework attribute was deprecated in Matplotlib 3.6 and will be removed two minor releases later.
plt.imshow(img[0])
解决方法:
1、打开设置
2、依次选择工具-》python scientific
3、取消在工具窗口中显示绘图的√
评论