1. 程式人生 > >tensorflow讀取jpg格式圖片報錯 ValueError: Only know how to handle extensions: ['png']; with Pillow installed matplotlib can handle more images

tensorflow讀取jpg格式圖片報錯 ValueError: Only know how to handle extensions: ['png']; with Pillow installed matplotlib can handle more images

nac pill images flow value bubuko 技術分享 img info

當運行mpimg.imread("img.jpg")時,spyder 出現如下錯誤:

ValueError: Only know how to handle extensions: [‘png‘]; with Pillow installed matplotlib can handle more images

解決辦法就是 安裝pillow即可

我是在anaconde裏安裝的很簡單,執行如下步驟即可:

技術分享圖片

tensorflow讀取jpg格式圖片報錯 ValueError: Only know how to handle extensions: ['png']; with Pillow installed matplotlib can handle more images