How to install pycairo on osx?

后端 未结 6 1312
夕颜
夕颜 2020-12-09 20:07

I am trying to install the pycairo (Python bindings for the cairo graphics library) under OSX.

I started with

easy_install pycairo

6条回答
  •  一整个雨季
    2020-12-09 20:37

    If you already have homebrew, these two commands should be helpful:

    $ brew install cairo --use-clang 
    $ brew install py2cairo
    

    For a non-Homebrew installed Python, set the PYTHONPATH to find pycairo. You can set your PYTHONPATH in your .bashrc/.profile/.whatever to the following:

    PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH.
    

    I personally didn't need to use this last part but it might help you.

提交回复
热议问题