1. 程式人生 > >python報錯解決方法:module 'scipy.misc' has no attribute 'imread'

python報錯解決方法:module 'scipy.misc' has no attribute 'imread'

執行python程式,使用scipy.misc import imread時,

報錯:

module 'scipy.misc' has no attribute 'imread'。

報錯原因:

檢視scipy.misc幫助檔案得知,imread依賴於pillow

解決方法

在該python環境中,安裝Pillow即可

pip3 install Pillow