AttributeError: module matplotlib has no attribute imshow

  1. 首先确自己正确安装了matplotlib库
  2. 查看自己的import
    正确写法应该是from matplotlib import pyplot as plt, 再使用plt.imshow()方法
    而不是直接import matplotbib后就使用plt.imshow()方法

你可能感兴趣的:(心得,人工智能,python,机器学习)