码迷,mamicode.com
首页 > Web开发 > 详细

在apache上报错“The _imaging C module is not installed”

时间:2015-06-06 17:55:32      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:

我的环境是python2.7.8、django1.6.4、apache2.2。

问题:在django自带的runserver环境下没有任何报错,但是配置在apache上出现了 “The _imagingft C module is not installed”的报错。找了很久原来是因为

import Image的时候 PIL包在window底下的貌似是二进制的类似问题,需要下载Pillow的对应whl文件进行修补,下载链接:

http://www.lfd.uci.edu/~gohlke/pythonlibs/

里面找到Pillow的对应whl文件,然后pip install wheel下载wheel,pip install /yourpath/file.whl进行安装,注意在此之前必须先装PIL在安装对应的Pillow的whl文件。

最重要的一点,必须要把项目中的   import Image   改成   from PIL import Image,否则会报其他的错误。

然后Ok,TMD终于解决了。

在apache上报错“The _imaging C module is not installed”

标签:

原文地址:http://www.cnblogs.com/zhaojia-dream/p/4556999.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!