[cairo] couldn't import cairo within python in Mavericks

Giancarlo Ruffo ruffo at di.unito.it
Thu Jun 26 07:10:37 PDT 2014


Dear all,

I have this configuration on my MacBook Air:

OSX Mavericks
iPython (distribution: Anaconda)
python 2.7
igraph packacge installed

the plot function uses cairo, and I tried to install it.

Hence, I installed Cairo and Py2Cairo (version: 1.10.0). Everything
apparently works with the installation. But when I try to execute
"import cairo" using tests included in your distribution of PyCairo,
these messages are returned:

$ py.test
============================= test session starts
==============================
platform darwin -- Python 2.7.7 -- py-1.4.20 -- pytest-2.5.2
collected 0 items / 2 errors

==================================== ERRORS
====================================
_________________________ ERROR collecting api_test.py
_________________________
api_test.py:12: in <module>
>   import cairo
E   ImportError: No module named cairo
______________________ ERROR collecting examples_test.py
_______________________
examples_test.py:11: in <module>
>   import cairo
E   ImportError: No module named cairo
=========================== 2 error in 0.03 seconds
============================


In fact, I cannot execute the "plot" function within iPython/igraph...

Can you help me?

Thanks
Giancarlo Ruffo



More information about the cairo mailing list