python - 在 Win7 64 位、Python 2.6.4 中安装 PIL (Python Imaging Library)

标签 python python-imaging-library windows-7-x64

我正在尝试安装所述库以与 Python 一起使用。我尝试下载适用于 Windows 的可执行安装程序,它可以运行,但说它没有找到 Python 安装。然后尝试注册 (http://effbot.org/zone/python-register.htm) Python,但脚本说它无法注册(尽管 key 出现在我的注册器中)。

然后我尝试下载源包:我运行 setup.py 构建并且它可以工作,但是当我运行 setup.py install 时它显示以下内容:

running install
running build
running build_py
running build_ext
building '_imaging' extension
error: Unable to find vcvarsall.bat

我能做什么?

更新(2014 年 5 月): 就像一些评论和答案所说,PIL 目前是无人管理的,现在要走的路是使用 Pillow ( https://pypi.python.org/pypi/Pillow/pip installpillow )。

最佳答案

我在这里找到了一个可用的 win7 二进制文件:Unofficial Windows Binaries for Python Extension Packages 它来自加州大学欧文分校的 Christoph Gohlke。 32 位和 64 位窗口都有适用于 python 2.5、2.6、2.7、3.1 和 3.2 的二进制文件。

这里还有很多其他的编译包。

请务必先卸载旧的 PIL。 如果您使用了 easy_install: easy_install -mnX pil
然后将python/Lib/site-packages中的egg去掉

请务必删除任何其他失败的尝试。我已将 _image dll 移到 Python*.*/DLLs 中,我不得不将其删除。

关于python - 在 Win7 64 位、Python 2.6.4 中安装 PIL (Python Imaging Library),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2088304/

相关文章:

python - "Pillow was built without XCB support"

windows - 如何将我的 perl 脚本打包为 32 位可执行文件?

python - SQS : How can I read the sent time of an SQS message using Python's boto library

python - ValueError : The truth value of an array with more than one element is ambiguous. 使用 a.any() 或 a.all()

python - PIL图像显示正常但保存黑色

asp.net - ASP .Net 页面无法显示错误

visual-studio - Runas 错误 : Unable to Acquire Password

python - 将两个时间戳 float 转换为可读的年数、月数和天数

python - 为什么在 Docker 镜像中使用 requirements.txt

python - Pillow :使用 Draw.rectangle 的奇怪行为