how to install PIL system-wide?

William Park parkw at better.net
Sat Mar 25 18:01:36 CET 2000


On Sat, Mar 25, 2000 at 04:33:36PM +0000, Gabriel Zachmann wrote:
> 
> Could some kind soul please explain to me how I should install 
> PIL (python image library) system-wide under Unix, so that
> people don't explicitely have to set their PYTHONPATH environment
> variable??
> 
> I compiled PIL, 'make check' worked,
> the I copied it, according to the README, under
> /path/python-1.5.2/lib/python-1.5/site-packages/PIL.
> That didn't work.
> 
> Maybe, because
>     print sys.path
> said
> ['', '/igd/a4/software/python-1.5.2/lib/python1.5/',
> '/igd/a4/software/python-1.5.2/lib/python1.5/plat-irix646',
> '/igd/a4/software/python-1.5.2/lib/python1.5/lib-tk',
> '/igd/a4/software/python-1.5.2/lib/python1.5/lib-dynload']
> (in one line, of course ;-)
> 
> So I moved PIL to /igd/a4/software/python-1.5.2/lib/python1.5/plat-irix646.
> Now, there is a subdirectory PIL in plat-irix646.
> In that directory, there is a file __init__.py
> (which is empty except for a few comments),
> and there is a file PIL.pth in directory plat-irix646,
> which contains just the word "PIL".
> 
> I'm confused: it should work shouldn't it?
> 
> I looked at the FAQ, of course, but that talke mainly about Tk, and X
> modules, and I searched dejanews, to no avail.
> (From dejanews I learned about the __init__.py file ;-)
> 
> Any hints, suggestions, insights
> will be highly appreciated,
> Gab.

One solution is
    /igd/a4/software/python-1.5.2/lib/python1.5/site-packages/PIL/...
    /igd/a4/software/python-1.5.2/lib/python1.5/site-packages/PIL.pth
and another is
    /igd/a4/software/python-1.5.2/lib/site-python/PIL/...
    /igd/a4/software/python-1.5.2/lib/site-python/PIL.pth

--William




More information about the Python-list mailing list