PIL, Python and CGI

Sascha Ferley Sascha.Ferley at infineon.net
Sun Jun 23 19:37:27 EDT 2002


Fredrik Lundh wrote:

> Sascha Ferley wrote:
>
> >     raise ImportError, "The _imaging C module is not installed"
> > ImportError: The _imaging C module is not installed
> >
> > Anyone have any ideas?
>
> when running your CGI script, the Python interpreter
> cannot find the _imaging extension.
>
> chances are that sys.path isn't what you think it is.
>
> </F>

Well I wrote a quick cgi script to get the path .. here is the output:
['/export/server/web/CPSC461/cgi-bin', '/usr/local/lib/python2.2',
'/usr/local/lib/python2.2/plat-sunos5',
'/usr/local/lib/python2.2/lib-tk',
'/usr/local/lib/python2.2/lib-dynload',
'/usr/local/lib/python2.2/site-packages',
'/usr/local/lib/python2.2/site-packages/PIL']

Program used:
#!/usr/local/bin/python

import sys
import cgi

print "Content-Type: text/plain \n\n"
print sys.path

As one can see the PIL library is in the path .. but still for some
strange reason it can't find the _imaging extention..
It is sort of strange that it wouldn't pick it up then.. any more ideas?

Sascha





More information about the Python-list mailing list