I want to run some library which uses cairocffi package.
However, when I try to run it I get:
OSError: dlopen() failed to load a library: cairo / cairo-2 /
So I've installed cairo using 'brew install cairo'. Then I tried to install py2cairo (1.10.0), (using waf) and got
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Looking for this error in google gives a lot of pages but regarding Xcode. Finally I found this (later also this. I was then able to install py2cairo using './waf install'.
But I still had the same error, so I went to the cairocffi/init.py and changed line 46 from:
cairo = dlopen(ffi, 'cairo', 'cairo-2')
to:
cairo = dlopen(ffi, 'cairo', 'cairo-2', 'py2cairo')
error changed only to:
OSError: dlopen() failed to load a library: cairo / cairo-2 / py2cairo
I can't see if it was installed properly, but probably not, because I don't see it using
sorted(["%s==%s" % (i.key, i.version) for i in pip.get_installed_distributions()])
which I can understand since I installed it without pip. But I also can't import it in python console either with 'import cairo' or 'import py2cairo'.
I tried 'brew install cairo' and got 'cairo-1.14-0 already installed'. I tried to install py2cairo-1.10.0, can it be the source of problems?
I use Python 2.7.3 and have OS X 10.10.5.