Python图像库在PyPI上无法获取,还是我遗漏了什么?
使用 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 中使用 import Image
导入它,但当我让 Django 进行数据库同步时,仍然出现以下错误:
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。
5 个回答
1
解决方法是在 easy_install 安装的 PIL 这个包的文件夹里,创建一个名为 "PIL" 的链接指向这个文件夹。
1
easy_install是区分大小写的,也就是说它对字母的大小写很敏感。你要找的这个包是在PIL下面的。
5
当然,PIL可以在PyPi上找到!具体来说,它就在这里。