在 Windows 上为 Python 2.7 64 位获取 PIL 而不是 Pillow
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19244057/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Obtaining PIL instead of Pillow for Python 2.7 64-bit on Windows
提问by Metalshark
Pillow for Python seems to be completely broken. Every image produces an IOError: cannot identify image file
. Using Python 2.6 (where I had PIL installed) works great. Does anyone know where to get hold of PIL-1.1.7.win-amd64-py2.7.exe
now that http://www.lfd.uci.edu/~gohlke/pythonlibs/has moved on to only offering Pillow?
Python Pillow 似乎完全坏了。每个图像产生一个IOError: cannot identify image file
. 使用 Python 2.6(我安装了 PIL)效果很好。有谁知道PIL-1.1.7.win-amd64-py2.7.exe
现在从哪里得到http://www.lfd.uci.edu/~gohlke/pythonlibs/已经转向只提供枕头?
EDIT:Please note that PIL 1.1.7 on Python 2.7 using Windows 64-bit is confirmed working when opening the same files, we just cannot find the installer.
编辑:请注意,当打开相同的文件时,使用 Windows 64 位的 Python 2.7 上的 PIL 1.1.7 被确认工作,我们只是找不到安装程序。
采纳答案by Omid Raha
Here you can find PIL-1.1.7.win-amd64-py2.7.exe
在这里你可以找到PIL-1.1.7.win-amd64-py2.7.exe
回答by nickzam
Install Pillow or PIL from repository (option 1 or 2). I would recommend you to use Pillow instead of PIL. If options 1 and 2 would not help use option 3. You don't need a separate installer for windows.
从存储库安装 Pillow 或 PIL(选项 1 或 2)。我建议您使用 Pillow 而不是 PIL。如果选项 1 和 2 对使用选项 3 没有帮助。您不需要单独的 Windows 安装程序。
To install for Windows you can use easy_install:
easy_install Pillow
or pip
pip install Pillow
or just get Pillow source from Pillow repositoryunpack and run
python setup.py install
要为 Windows 安装,您可以使用 easy_install:
easy_install Pillow
或点
pip install Pillow
或者只是从Pillow 存储库中获取 Pillow 源 解压并运行
python setup.py install
Online help for Pillow is here
Pillow 的在线帮助在这里
回答by vaibhaw
Thisblog by Christian explains process of compiling PIL for 64 bit Python in Windows 7 64-bit with Visual Studio 2010. At end of the blog, zip file containing compiled files for PIL and dependencies is also provided
Christian 的这篇博客解释了使用 Visual Studio 2010 在 64 位 Windows 7 中为 64 位 Python 编译 PIL 的过程。在博客末尾,还提供了包含 PIL 和依赖项的编译文件的 zip 文件