2016-10-22 36 views
0

我在Windows上的Python 2.7中導入圖像庫時遇到問題。當我寫:在Windows上導入圖像

import Image 

我有錯誤:

No module named Image

庫中項目設置中添加,所以我嘗試

from PIL import Image

不幸的是我現在有一個錯誤

raise IOError("decoder %s not available" % decoder_name) 
IOError: decoder zip not available 

我不知道該怎麼做。

+0

假設你的Python安裝的其餘部分的工作,我會嘗試手動下載並安裝['pillow'](來自pypi包索引的https://pypi.python.org/pypi/Pillow)模塊。 – martineau

+0

http://stackoverflow.com/questions/3544155/about-the-pil-error-ioerror-decoder-zip-not-available – xli

+0

它不爲我工作 – abioticGirl

回答

2

對於Windows:

python -m pip install Pillow 

然後在你的Python代碼:

from PIL import Image