Django Girls and Boys 備忘録

Python、Selenium、Django、java、iPhoneアプリ、Excelマクロなどで気付いたこと、覚えておきたいことなどを載せていきます。

【Python】Pillowのインストールで「Could not find a version that satisfies the requirement pil (from versions: none) ERROR: No matching distribution found for pil」などとエラーが出た時の対処方法

Pythonの画像処理ライブラリであるpillowをインストールしようとしたところ以下のような思わぬエラーが出て戸惑ったことがあったので備忘録として残しておきます。

 

>pip install pil
  Defaulting to user installation because normal site-packages is not writeable
  ERROR: Could not find a version that satisfies the requirement pil (from        
versions: none) ERROR: No matching distribution found for pil

 

 

 

 

原因は単純なことでした。

 

イメージファイルを操作するためのimport文が、

 

from PIL import Image

 

であったことや、たまたまインストールに際して参考にしたところの情報などからインストール用のコマンドを上記のように入力していたのですが、正しくは、

 

>pip install pillow

 

でした。