在Win7 64位,Python 2.6.4中安装PIL(Python映像库) [英] Installing PIL (Python Imaging Library) in Win7 64 bits, Python 2.6.4

查看:100
本文介绍了在Win7 64位,Python 2.6.4中安装PIL(Python映像库)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装用于Python的库.我尝试下载运行Windows的可执行安装程序,但说找不到Python安装.然后尝试注册( http://effbot.org/zone/python-register.htm )Python,但脚本说它无法注册(尽管密钥出现在我的寄存器中).

然后我尝试下载源程序包:我运行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(解决方案

在Windows x64上编译PIL显然有些麻烦. (嗯,在Windows上编译任何东西对我的经验来说有点痛苦.但是仍然如此.)与PIL本身一样,您将需要构建许多依赖项.还要从邮件列表中参见这些注释. >

此消息,但我自己还没有尝试过.如果您不介意从那些不太可靠的文件上传站点之一进行下载,则可能值得一试.除此之外...好吧,您总是可以放弃,取而代之的是32位Python二进制文件.

I'm trying to install said library for use with Python. I tried downloading the executable installer for Windows, which runs, but says it doesn't find a Python installation. Then tried registering (http://effbot.org/zone/python-register.htm) Python, but the script says it can't register (although the keys appear in my register).

Then I tried downloading the source package: I run the setup.py build and it works, but when I run setup.py install it says the following:

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

What can I do?

UPDATE (May 2014): Like said by some comments and answers, PIL is currently unmantained, and the way to go now is to use Pillow (https://pypi.python.org/pypi/Pillow/, pip install pillow).

解决方案

Compiling PIL on Windows x64 is apparently a bit of a pain. (Well, compiling anything on Windows is a bit of a pain in my experience. But still.) As well as PIL itself you'll need to build many dependencies. See these notes from the mailing list too.

There's an unofficial precompiled binary for x64 linked from this message, but I haven't tried it myself. Might be worth a go if you don't mind the download being from one of those slightly dodgy file-upload sites. Other than that... well, you could always give up and instead the 32-bit Python binary instead.

这篇关于在Win7 64位,Python 2.6.4中安装PIL(Python映像库)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆