How to install pycairo on mac os x?

This is the first time I've ever touched python, I try to use the cairo library, but could not import it, getting a 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, described in detail below:

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

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

3) Installed py-cairo from macports 'sudo install py-cairo' (after you could not import cairo)

4) Installed py-cairo from the original 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 that was created, but it contains only "_cairo.so" and I still cannot import cairo from the python interpreter.

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

+7
python installation macos
source share

No one has answered this question yet.

See similar questions:

eleven
How to install pycairo on osx?
one
How to install pycairo to build Apple Python 2.7 using easy_install

or similar:

5116
How to check if a file exists without exceptions?
4268
How to combine two dictionaries in one expression?
3474
How to list all the catalog files?
3428
How to sort a dictionary by value?
3235
How to check if a list is empty?
2453
How to install pip on windows?
2030
How do you break a list into pieces with uniform size?
1970
Does Homebrew install a specific version of a formula?
1676
How to install pip on macOS or OS X?
1541
Find (and kill) port 3000 lock process on Mac

All Articles