3

我正在学习 Django,所以我创建了一个简单的图库应用程序,它允许我通过 Django管理应用程序上传图像。当我从计算机中通过ImageField选择图像并点击Save时,会出现错误

ImproperlyConfigured at /admin/photogallery/photo/add/
The '_imaging' module for the PIL could not be imported: DLL load failed: The specified module could not be found.

我正在使用 Django1.6、apache2.2、Python2.7.5 并且还为这个版本的 python 安装了 PIL。

有谁知道如何解决这个问题?

4

2 回答 2

2

正如 Ludwik Trammer 建议的那样,我卸载了PIL并安装了Pillow,问题就解决了。PIL对我来说在早期版本的Django上工作得很好,但在 Django 1.6 上却不行

于 2014-02-12T09:09:09.397 回答
0

如果您使用的是 anaconda 发行版,请尝试安装 PIL 安装此命令

conda install -c anaconda pillow 
于 2019-02-15T16:20:27.740 回答