On Nov 25, 11:41 am, Stranger <dmitriy.troits...@gmail.com> wrote:
> Hi all,
> I've got problem when trying to run my first django project through
> apache/mod_wsgi.
> After proper vhost configuration has been done and I ran my app and
> got this:
>
> Caught ImportError while rendering: The _imaging C module is not
> installed
>
> I googled a lot around this problem and found that common case of this
> is absence of PIL or imcompatibility with current python installation.
> But if I run python directly and do the following:
>
> import _imaging
>
> I got no errors! So PIL works fine and this is confirmed by that my
> site works great on internal dev server!
> So I have no idea what's the reason of error, maybe this is because I
> downloaded precompiled binary of mod_wsgi and it has been built with
> another version of Python. What should I do?

Validate what Python installation mod_wsgi is compiled against and see
if that is the same as where PIL is installed. You can work out where
PIL is installed by doing:

  import PIL
  print PIL.__file__

Also validate what sys.path is set to for Python running under
mod_wsgi.

Also validate that PIL installation has permissions such as user that
Apache runs as can read it.

See the following for various instructions on how to do some of this.

  http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to