1

我在 Windows 7 x64 上有 Python 2.7。我已经安装了 virtualenv 并在 virtualenv 中安装了 Pinax 项目。当我尝试同步数据库时,我收到一条错误消息,指出需要 PIL。我尝试为 2.7 安装 PIL 1.1.7,但没有正确安装。当我运行 syncdb 时,出现以下错误。

Error: One or more models did not validate:
photologue.photo: "image": To use ImageFields, you need to install the Python Im
aging Library. Get it at http://www.pythonware.com/products/pil/ .
photologue.watermark: "image": To use ImageFields, you need to install the Pytho
n Imaging Library. Get it at http://www.pythonware.com/products/pil/ .
avatar.avatar: "avatar": To use ImageFields, you need to install the Python Imag
ing Library. Get it at http://www.pythonware.com/products/pil/ .
photos.image: "image": To use ImageFields, you need to install the Python Imagin
g Library. Get it at http://www.pythonware.com/products/pil/ .

据我了解,这是因为这是 x32。所以我从http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil下载了非官方的 x64 版本并尝试安装。Windows 安装程序指出它无法找到 python,因此无法安装 PIL。我检查了注册表,python 在那里。

有什么想法,因为我迷路了吗?

4

2 回答 2

0

我在 Windows 上工作已经有一段时间了,但我相信您可能需要安装 64 位版本的 Python。我可能是错的,但我不认为 32 位 Python 能够运行 64 位库。我认为您看到的错误消息是 64 位 PIL 正在寻找 64 位 Python 并且找不到它。

于 2011-08-20T06:55:58.657 回答
0

只要您运行 32 位 Python,就可以在 Win7x64 上安装 32 位 PIL。

于 2013-05-07T18:49:50.620 回答