Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6382453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:31:25+00:00 2026-05-25T02:31:25+00:00

Has anyone installed pycairo 1.10 on the mac using the new waf build? Its

  • 0

Has anyone installed pycairo 1.10 on the mac using the new waf build? Its failing on can’t find python headers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:31:25+00:00Added an answer on May 25, 2026 at 2:31 am

    I think waf is seriously broken for Mac OS X 🙁

    Here’s how it worked for me. After python waf configure failed to find Python.h, I looked through the config.log file located in build_directory and found out that the true cause of failure was incompatible architecture. The waf script tries to build a simple source file with CPython calls in it using i386 architecture. It fails to do so, because my python is built for the x86_64 architecture.

    I guess, you could rebuild python as a universal binary, I haven’t tried that. It is possible, however, to build pycairo using the x86_64 architecture. Here’s how.


    My setup:

    $ python --version
    Python 2.7.2
    
    $ type python
    python is /usr/local/bin/python
    
    $ file /usr/local/bin/python
    /usr/local/bin/python: Mach-O 64-bit executable x86_64
    
    $ brew --version
    0.8
    

    Importrant: my python version is built for the x86_64 architecture. Make sure it is also the case for you before performing the steps described below.

    brew stands for homebrew. You must use it instead of fink or MacPorts in order for the following steps to work for you.


    Now, to install cairo and pycairo I do the following:

    1. brew install cairo (version 1.10.2 as of today)

    2. Get pycairo source for python 2.x (if you get a snapshot, it is named py2cairo, whereas pycairo now requires python 3.x). I used the source from master branch (commit f3435910d8f5365b45ebd4216f4043383c9e3e19)

    3. Open wscript in your editor of choice, locate the line env = ctx.env in the function configure and add the following line below it

      env.append_unique('CFLAGS', ['-arch', 'x86_64'])

    4. Save the file

    5. Run these commands in your terminal:

      export CC=/usr/bin/gcc

      export PKG_CONFIG_PATH=/usr/local/Cellar/cairo/1.10.2/lib/pkgconfig/

      Important: the latter path will only work for you if you installed cairo via homebrew

    6. Then run the waf commands described in the pycairo’s INSTALL file:

      python waf configure

      python waf build

      python waf install

    This should do it. If it doesn’t work for you, I think it’s better to raise the topic on the pycairo mailing list (if it has one).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone got the new jBPM 4.3 web designer installed and working? I am
I can't find much information around the web about it. Has anyone used both
Has anyone had any luck with compiling 64-bit Python extension modules for Windows using
Has anyone successfully installed VS 2008 Team Developer edition on the Windows 7 beta
Has anyone ever set up Cruise Control to build an OS X Cocoa/Objective-C project?
Has anyone run into this error message before when using a timer on an
Has anyone installed ESRI mapobjects activeX controls in Delphi 2010? I get a conflict
Has anyone tried migrating from ScrewTurn to Confluence ? I'm hoping that I can
has anyone installed OpenCV 2.0 on windows? Does the installation create directories such as
Has anyone seen an issue where you can export your app to an .apk

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.