k0b0's record.

Computer Engineering, Arts and Books

python3に画像処理ライブラリPillow (PIL)をインストールする。

画像処理関連のプログラムを書いて実行したら、

ImportError: No module named 'PIL'

という具合にエラー発生。

それで、python3にPIL(Python Imaging Library)をインストールしようと以下のコマンドを実行した。

pip install PIL

そしたら、またまたエラー発生。

Collecting PIL
  Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL

PILがない???

python3ではPILではなくPillowが対応していた

調べてみると、PILの対応はpython2.7で止まってるみたい。。。
それで、python3にはPILのフォークプロジェクト"Pillow"が対応しているようだ。

そういうわけでPillowをインストールして問題解決。

pip install pillow