解決AttributeError: module 'scipy.misc' has no attribute 'toimage'報錯問題

學習MNIST機器學習入門課程時,運行書中例程save_pic.py時,出現AttributeError: module ‘scipy.misc’ has no attribute 'toimage’報錯問題,截圖如下: 這是因爲當前環境沒有安裝PIL庫,庫名現在爲Pillow,解決方法如下: 點擊Pycharm中的File→Setting: 安裝完成,按ok回到程序編輯界面,重新運行即可:
相關文章
相關標籤/搜索