错误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)

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM