question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in installing pycairo to Mac OS.

See original GitHub issue

Hello, I’m a science YouTuber in Japan with subscribers 10000+.

I’m such a big fan of 3Blue1Brown’s video that I started to upload mathematical videos. These days, 3b1b’s video makes me want to make mathematical animations like him.

Today, I tried to install manim to my Mac OS Mojave (ver 10.14.4), following Brian Howell’s website (http://bhowell4.com/manic-install-tutorial-for-mac/). But I have a trouble in installing pycairo.

… - … -MacBook-Pro:manim kasagonaoki$ pip install pycairo Collecting pycairo Using cached https://files.pythonhosted.org/packages/48/20/5e83af98eb897935bf7dc39455e892ba866feebb9b7c3b392982866f9958/pycairo-1.18.1.tar.gz Installing collected packages: pycairo Running setup.py install for pycairo … error

ERROR: Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c ‘import setuptools, tokenize;file=’“'”‘/private/var/folders/94/qz1q_1015gq84sdfwns2f8hm0000gn/T/pip-install-s_02k2sk/pycairo/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’“‘))’ install --record /private/var/folders/94/qz1q_1015gq84sdfwns2f8hm0000gn/T/pip-record-jskbs96p/install-record.txt --single-version-externally-managed --compile: ERROR: running install running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.7 creating build/lib.macosx-10.9-x86_64-3.7/cairo copying cairo/init.py -> build/lib.macosx-10.9-x86_64-3.7/cairo copying cairo/init.pyi -> build/lib.macosx-10.9-x86_64-3.7/cairo copying cairo/py.typed -> build/lib.macosx-10.9-x86_64-3.7/cairo running build_ext Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc’ to the PKG_CONFIG_PATH environment variable Package ‘libffi’, required by ‘gobject-2.0’, not found Command ‘[‘pkg-config’, ‘–print-errors’, ‘–exists’, ‘cairo >= 1.13.1’]’ returned non-zero exit status 1. ---------------------------------------- ERROR: Command “/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c ‘import setuptools, tokenize;file=’”'”‘/private/var/folders/94/qz1q_1015gq84sdfwns2f8hm0000gn/T/pip-install-s_02k2sk/pycairo/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’“‘))’ install --record /private/var/folders/94/qz1q_1015gq84sdfwns2f8hm0000gn/T/pip-record-jskbs96p/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /private/var/folders/94/qz1q_1015gq84sdfwns2f8hm0000gn/T/pip-install-s_02k2sk/pycairo/

How do I attack this problem ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
mrichmancommented, May 3, 2019

This solved my problem:

export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
export LDFLAGS="-L/usr/local/opt/libffi/lib" 
1reaction
mrichmancommented, May 3, 2019

Same error here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MacOS install pycairo - python - Super User
I ran pip3 install pycairo , but I got an error when setup.py was run for pycairo. I have cairo installed, but when...
Read more >
pip install pycairo fails on osx: 'pkg-config' search path problems
I've been trying to install pycairo on a mac os x. I'm getting an error message,. Initially I was getting 'pkg-config' not found...
Read more >
Installing pycairo on mac : r/learnpython - Reddit
I am trying to install 3b1b's Manim on mac but for some reason I keep getting an error when installing pycairo, and googling...
Read more >
Getting Started — Pycairo documentation
Installing Pycairo requires pkg-config and cairo including its headers. Here are some examples on how to install those for some platforms: Ubuntu/Debian: sudo ......
Read more >
ERROR: Could not build wheels for pycairo in Python
Now that pip is upgraded, try to run the pip install pycairo command. ... VENV python3 -m venv venv # 👇️ activate on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found