在Windows 7上安装PINAX和PIL
我在Windows 7 x64上使用Python 2.7。我已经安装了virtualenv,并在这个虚拟环境中安装了Pinax。当我尝试运行syncdb时,出现了一个错误,提示需要PIL这个库。我尝试安装了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/ .
我了解到这个问题是因为我使用的是32位的版本。所以我从http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil下载了一个非官方的64位版本,并尝试安装。但是Windows的安装程序提示找不到Python,所以无法安装PIL。我检查了注册表,Python确实在那儿。
有没有什么建议?我现在很困惑。
2 个回答
0
只要你在64位的Windows 7上使用的是32位的Python,就可以安装32位的PIL库。
0
我已经有一段时间没在Windows上工作了,但我觉得你可能需要安装一个64位的Python。我可能说错了,但我觉得32位的Python是无法运行64位的库的。你看到的错误信息可能是因为64位的PIL在寻找64位的Python,但找不到它。