[GRASS-user] ps.map can't find python imaging library

Terry Duell tduell at iinet.net.au
Sun Mar 30 19:44:30 PDT 2014


Copy of my reply to Anna.

On Mon, 31 Mar 2014 13:41:15 +1100, Terry Duell <tduell at iinet.net.au>  
wrote:

> Hello Anna,
>
> On Mon, 31 Mar 2014 12:32:14 +1100, Anna Petrášová  
> <kratochanna at gmail.com> wrote:
>
> [snip]
>
>>
>> There are 2 versions of PIL, the original one (development stopped)  
>> which
>> is not available on Fedora any more I think, and the new one - pillow -
>> which requires different form of import. So you can either install newer
>> version of GRASS (probably 6.4.4 or 7, but you would have to probably
>> compile it yourself) which has this issue solved or manually fix the  
>> line
>> in the Python code in your grass installation:
>>
>> Index: /grass/trunk/gui/wxpython/psmap/utils.py
>> ===================================================================
>> --- /grass/trunk/gui/wxpython/psmap/utils.py	(revision 57219)
>> +++ /grass/trunk/gui/wxpython/psmap/utils.py	(revision 58940)
>> @@ -22,5 +22,5 @@
>>
>>  try:
>> -    import Image as PILImage
>> +    from PIL import Image as PILImage
>>      havePILImage = True
>>  except ImportError:
>>
>>
>> If you need some more help let us know.
>>
>
> Thanks for your very quick and helpful response.
> I made the above change to 'utils.py' and it now appears to be working  
> nicely.
>
> Many thanks.
>
> Cheers,


-- 
Regards,
Terry Duell


More information about the grass-user mailing list