错误Matplotlib is building the font cache using fc-list. This may take a moment.

这上面的错误是因为你环境中没有安装GUI工具,但是你在代码中又想要显示图片,即有下面的语句:

    plt.imshow(np.transpose(npimg, (1, 2, 0)))
    plt.show()

那么就会报上面的错误,如果想要查看图像的话,建议你将其存到文件夹中查看

即将上面的代码改为:

    plt.imshow(np.transpose(npimg, (1, 2, 0)))
    plt.savefig('./data/out_image/'+name)

 

posted @ 2019-03-19 17:41  慢行厚积  阅读(6114)  评论(0编辑  收藏  举报