从 Ubuntu 14.04 开始工作,但这应该是普遍适用的。安装时,我调用了以下命令:
sudo python setup.py install
我注意到以下描述默认安装的语句:
...
Installing pildriver.py script to /usr/local/bin
Installing viewer.py script to /usr/local/bin
Installing gifmaker.py script to /usr/local/bin
Installing painter.py script to /usr/local/bin
Installing pilfont.py script to /usr/local/bin
Installing pilprint.py script to /usr/local/bin
Installing pilconvert.py script to /usr/local/bin
Installing enhancer.py script to /usr/local/bin
Installing pilfile.py script to /usr/local/bin
Installing createfontdatachunk.py script to /usr/local/bin
Installing explode.py script to /usr/local/bin
Installing thresholder.py script to /usr/local/bin
Installing player.py script to /usr/local/bin
Installed /usr/local/lib/python2.7/dist-packages/Pillow-3.4.2-py2.7-linux-x86_64.egg
所以,我运行了以下内容:
cd /usr/local/bin
sudo rm -f pildriver.py viewer.py gifmaker.py painter.py pilfont.py pilprint.py pilconvert.py enhancer.py pilfile.py createfontdatachunk.py explode.py thresholder.py player.py
sudo rm -f /usr/local/lib/python2.7/dist-packages/Pillow-3.4.2-py2.7-linux-x86_64.egg
通过 apt-get 重新安装 Pillow (python-imaging) 后,一切运行正常。