How to install PyCairo 1.10 on Mac OSX with default python

前端 未结 3 1083
遥遥无期
遥遥无期 2020-12-14 19:38

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

3条回答
  •  無奈伤痛
    2020-12-14 20:08

    For anyone coming back to this, I was able to get py2cairo installed on OSX Lion with a slightly different approach, based on llimllib's link. Hope this helps:

    python waf clean
    export PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.7/
    export LD_LIBRARY_PATH=/Library/Frameworks/Python.framework/Versions/2.7/:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib:$LD_LIBRARY_PATH
    export LINKFLAGS='-search_dylibs_first  -L /Library/Frameworks/Python.framework/Versions/2.7/lib/'
    export ARCHFLAGS='-arch x86_64'
    export CC=/usr/bin/gcc-4.2
    export PKG_CONFIG_PATH=/usr/local/Cellar/cairo/1.10.2/lib/pkgconfig/
    
    python waf configure --prefix=$PYTHONPATH
    python waf build
    python waf install
    

提交回复
热议问题