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 8165143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:28:12+00:00 2026-06-06T19:28:12+00:00

Here’s what I’ve done so far: I’ve installed Homebrew: /usr/bin/ruby -e $(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)

  • 0

Here’s what I’ve done so far:

I’ve installed Homebrew:

/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

Then python: brew install python

Then py2cairo: brew install py2cairo

both of these seem to install correctly, and when I type which python I get: usr/local/bin/python which I believe is homebrew’s version.

I’ve edited my path as many Homebrew guides have advised:

export PATH=/usr/local/bin:/usr/local/share/python:$PATH

Here’s what I get from echo $PATH: /usr/local/bin:/usr/local/share/python:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

I can also type python --version and get python 2.7.3 which seems right because if I look in /usr/local/Cellar/py2cairo/1.10.0/README it says:

Dependencies
------------
    cairo   >= 1.10.0
    Python  >= 2.6 

However after all this I’m still unable to import the py2cairo library into python. Here’s what I get when I try:

Sal:~ Lockyer$ python
Python 2.7.3 (default, May  6 2012, 13:47:31) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cairo
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap: 6

I think most people use pip or easy_install for this kind of thing, but I don’t think py2cairo is supported by those. Here’s what I get when I run pip-2.7 install py2cairo:

Downloading/unpacking py2cairo
  Could not find any downloads that satisfy the requirement py2cairo
No distributions at all found for py2cairo
Storing complete log in /Users/Lockyer/Library/Logs/pip.log

I think I must just be missing one final step where I somehow reveal to python where to import the library from… am I forgetting to add something to my path?

Here’s what I get when I run ls -l /usr/local/bin/python

lrwxr-xr-x  1 Lockyer  admin  33  6 May 13:48 /usr/local/bin/python -> ../Cellar/python/2.7.3/bin/python

Here’s what I get when I run otool -L /usr/local/Cellar/py2cairo/1.10.0/lib/python2.7/site-packages/cairo/_cairo.so:

/usr/local/Cellar/py2cairo/1.10.0/lib/python2.7/site-packages/cairo/_cairo.so:
    /private/tmp/homebrew-py2cairo-1.10.0-BtmY/py2cairo-1.10.0/build_directory/src/_cairo.so (compatibility version 0.0.0, current version 0.0.0)
    /usr/local/Cellar/cairo/1.10.2/lib/libcairo.2.dylib (compatibility version 11003.0.0, current version 11003.2.0)
    /System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.1)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

Moving /System/Library/Frameworks/Python.framework/Versions to my desktop, and running brew install py2cairo again seems to have fixed the error. It would be nice to know why it was building against Lion’s python though because it doesn’t seem to be first on the path…

  • 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-06-06T19:28:13+00:00Added an answer on June 6, 2026 at 7:28 pm

    I stumbled upon this same error. Through some googling, I found out that this issue had already been detected on the issues page for the project on GitHub.

    This seems to be a problem on how waf handles library imports, which I didn’t understand fully. A fix has already been submitted and is pending approval.

    If someone still runs into this problem before they accept the fix, it is possible to install the fixed formula for py2cairo following the commands proposed on this answer.

    brew rm -f py2cairo
    brew install  https://raw.githubusercontent.com/2bits/homebrew/15b3e67/Library/Formula/py2cairo.rb
    

    When the fix is approved, a simple brew update should fix the problem.

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

Sidebar

Related Questions

Here's my code in the <head></head> : <link rel=stylesheet href=http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css /> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js></script>
Here is the scenario. I'm writing my geo-ruby oracle adapter for Ruby On Rails
Here is my persistence.xml : <?xml version=1.0 encoding=UTF-8?> <persistence xmlns=http://java.sun.com/xml/ns/persistence xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd version=1.0>
here is my configuration: http://domain.com (obviously fictitious name...) hosted on a server running Apache
Here's my Manifest: <?xml version=1.0 encoding=utf-8?> <manifest xmlns:android=http://schemas.android.com/apk/res/android package=com.mappp.mobile android:versionCode=1 android:versionName=1.0 > <supports-screens android:largeScreens=true
Here's a piece of code I copied from http://www.schillmania.com/content/projects/javascript-animation-1/demo/ Very simple JS animation: function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Here's an interesting problem. On a recently installed Server 2008 64bit I opened IE
Here is an example of what I need http://code.google.com/webtoolkit/doc/latest/tutorial/gettingstarted.html I need interactive list to
Here is the cuplrit: http://www.franzsarmiento.com/contact_information.jsp I'm using HTML5 Boilerplate and for some reason in

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.