1

easy_install pil导致错误:

Searching for pil
Reading http://pypi.python.org/simple/pil/
Reading http://www.pythonware.com/products/pil
Reading http://effbot.org/zone/pil-changes-115.htm
Reading http://effbot.org/downloads/#Imaging
No local packages or download links found for pil
error: Could not find suitable distribution for Requirement.parse(‘pil’)

有任何想法吗?

--

更新: 嗯,要求它在 Python Ware 网站上查找链接似乎有效:

easy_install -f http://www.pythonware.com/products/pil/ Imaging

一路上得到了一堆警告。我会看看结果如何。

--

更新:我可以使用 Python 在 Python 中导入它import Image,但是当我告诉 Django 到 syncdb 时,我仍然收到以下错误:

Error: One or more models did not validate:
core.userprofile: “avatar”: To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .

我在我的一个模型中使用了 ImageField。

4

5 回答 5

5

PIL 当然在 PyPi 上!具体来说,就在这里

于 2009-06-15T02:09:35.203 回答
1

解决方法是在easy_install PIL egg 目录中以“PIL”的名称创建指向该目录的链接

于 2009-08-13T10:39:27.413 回答
1

easy_install 区分大小写。该软件包在 PIL 下。

于 2009-07-31T18:39:40.120 回答
0

import Image

Django tries to import PIL directly:

from PIL import Image

You should check presence of PIL directory in your site-packages

于 2009-06-15T02:59:04.397 回答
0

来自http://code.djangoproject.com/ticket/6054

似乎在根名称空间中安装 PIL 的 easy_install 有问题,从源安装解决了这个问题,很奇怪。

于 2010-07-12T11:48:34.473 回答