我正在尝试安装所述库以与 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/