Using ubuntu 13.10, python 2.7.5:
>>> import _imaging, Image
>>> from PIL import Image, ImageDraw, ImageFilter, ImageFont
>>> im = Image.new('RGB', (300,300), 'white')
>>> draw = ImageDraw.Draw(im)
>>> font = ImageFont.truetype('arial.ttf', 14)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFont.py", line 218, in truetype
return FreeTypeFont(filename, size, index, encoding)
File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFont.py", line 134, in __init__
self.font = core.getfont(file, size, index, encoding)
File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFont.py", line 34, in __getattr__
raise ImportError("The _imagingft C module is not installed")
**ImportError: The _imagingft C module is not installed**
>>>
So why does this happen? And how can I fix it? I followed the following instructions which I found at the bottom of this thread:
pip uninstall PIL
apt-get install libjpeg-dev
apt-get install libfreetype6-dev
apt-get install zlib1g-dev
apt-get install libpng12-dev
pip install PIL --upgrade
But while upgrading PIL, look what I saw:
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.7
platform linux2 2.7.5+ (default, Sep 19 2013, 13:48:49)
[GCC 4.8.1]
--------------------------------------------------------------------
*** TKINTER support not available
*** JPEG support not available
*** ZLIB (PNG/ZIP) support not available
*** FREETYPE2 support not available
*** LITTLECMS support not available
--------------------------------------------------------------------
Is it normal for support for all these items not to be available? how do I fix that?