Search code examples
pythonubuntu-14.04pango

Unable to import pango in python2


I am following this tutorial to set up and train the Tesseract 3 OCR tool. Some of the scripts use Pango. When I run the scripts, Python fails to import Pango.

ImportError: No module named pango 

I have tried to install the following packages, along with attempting to build Pango and Cairo from scratch as detailed here

libpango1.0-0
libpango1.0-dev
libpangox1.0-0

What am I missing? Is there a library I haven't installed/built?


Solution

  • You're missing the Python bindings. The packages listed only contain the native libraries and development files. Try completing the instructions in the linked article by installing PyGTK.