转自我的简书:https://www.jianshu.com/p/c7148585b295
------------------------------------------------------------------------------------------------------------------------------------------------------------------
不要想了,试了一下,也baidu,Google了很久,没有办法,PIL只有32位的,而且pip安装不了,32位的python可以去https://pypi.org/搜索下载手动安装。
幸运的是可以安装Pillow替代;C:\Windows\system32>pip install pillow
Collecting pillow
Using cached https://files.pythonhosted.org/packages/48/91/f058672c494e186dc900bb6253e8cbde3307da17aed0a2d1ebcfb80ab766/Pillow-5.2.0-cp27-cp27m-win_amd64.whl
Installing collected packages: pillow
Successfully installed pillow-5.2.0
安装成功后,import Image仍然报错;
>>> import Image
Traceback (most recent call last):
File "" , line 1, in <module>
ImportError: No module named Image
>>>
只需要这样导入即可正常使用了;
>>> import PIL.Image as Image
>>> im = Image.open('test.jpg')
>>> print im.format, im.size, im.mode
JPEG (1200, 900) RGB
>>> im.thumbnail((200,100))
>>> im.save('thumb.jpg', 'JPEG')
>>>
目录下成功生产了thumb.jpg的缩略图。