因為PIL庫目前只更新到python2.x,故python3.x直接安裝PIL庫會找不到版本。但是python3.x有一個新的庫,可以提供和PIL差不多的功能,也就是pillow庫。
本人使用的是python3.6.6,直接pip安裝,仍然無法使用from PIL install Image,網上沖浪一番,找到了解決辦法。參考網站在最后。
在commander中輸入下面代碼安裝。
python -m pip install Pillow
成功安裝后就跟PIL一樣正常使用吧。
參考
[1]https://stackoverflow.com/questions/8863917/importerror-no-module-named-pil
