7

This is the first time I've ever touched python, I'm trying to use a library 'cairo', but have been unable to import it getting the message

Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cairo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cairo

From what I understand I have installed all the correct libraries, detailed as follows:

1) Installed Python2.6.4 from the .dmg found http://www.python.org/download/releases/2.6.4/

2) Installed cairo1.8.8 from macports 'sudo port install cairo'

3) Installed py-cairo from macports 'sudo install py-cairo' (After not being able to import cairo)

4) Installed py-cairo from source tarball 'http://www.cairographics.org/pycairo/'

./configure
make install
python setup.py install

Now there is a directory /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/cairo which has been created but it only contains '_cairo.so' and I still cannot import cairo from the python interpreter.

Is there something obvious I did wrong...? Any help is appreciated.

Ned Deily
  • 83,389
  • 16
  • 128
  • 151
Akusete
  • 10,704
  • 7
  • 57
  • 73

0 Answers0