pip installation of cairocffi not working on mac
See original GitHub issueI tried to install cairocffi on Mac. I am getting error while importing cairocffi.
Below are environment details: Model: MacBook Pro OS X: 10.8.5 Python: 2.7.2
Command Log: <snip> sudo pip install cairocffi
…some warnings …
35 warnings generated.
clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch x86_64 build/temp.macosx-10.8-intel-2.7/c/_cffi_backend.o -L/opt/local/lib -lffi -o build/lib.macosx-10.8-intel-2.7/_cffi_backend.so
ld: warning: ignoring file /opt/local/lib/libffi.dylib, file was built for x86_64 which is not the architecture being linked (i386): /opt/local/lib/libffi.dylib
Running setup.py install for pycparser
Successfully installed cairocffi cffi pycparser
Cleaning up...
SymMacToolkit-C02K824VF1G3:specs nitin_bodke$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cairocffi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/cairocffi/__init__.py", line 39, in <module>
cairo = dlopen(ffi, 'libcairo.so.2', 'libcairo-2.dll', 'cairo', 'libcairo-2')
File "/Library/Python/2.7/site-packages/cairocffi/__init__.py", line 34, in dlopen
return ffi.dlopen(names[0]) # pragma: no cover
File "/Library/Python/2.7/site-packages/cffi/api.py", line 117, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "/Library/Python/2.7/site-packages/cffi/api.py", line 399, in _make_ffi_library
backendlib = backend.load_library(name, flags)
OSError: cannot load library libcairo.so.2: dlopen(libcairo.so.2, 2): image not found
>>>
</snip>
Issue Analytics
- State:
- Created 10 years ago
- Comments:24 (9 by maintainers)
Top Results From Across the Web
Overview — cairocffi 1.4.0 documentation - Read the Docs
cairocffi requires CFFI, which can be installed with pip but has its own dependencies that can be tricky to install. On Linux, install...
Read more >How to pip install cairocffi? - python - Stack Overflow
You'll need to install libffi and libffi-dev through your distro's package manager ( yum , apt-get , whatever) before the pip installation will...
Read more >cairocffi - PyPI
cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of Python bindings and object-oriented API for cairo. Cairo is a 2D vector...
Read more >Using Python's pip to Manage Your Projects' Dependencies
It's not installed by default with the interpreter. ... Note: Before you start any troubleshooting when the pip command doesn't work, ...
Read more >André E. Veltstra: "Hello, #python folks! Anyone r…" - Mastodon
(I run an OLD MacOs, with python 3.9 and other tools installed using ... pip installation of cairocffi not working on mac ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@SebaRGFSL
The following export fixed the issue for me:
Make sure you have
libcairo
dependencies withinhomebrew
location (or change it accordingly depending on your setup)… but
fixed it for me. Thanks!