from PIL import Image import matplotlib ... ... img = Image.open("../flower_data/tulip.png").convert('RGB') plt.axis('off') #关闭坐标轴 plt.imshow(img) plt.show()########################加上这句即可