Is there a better library for drawing vector graphics in Python than Cairo?
Asked Answered
G

2

11

...Not that I have anything against Cairo -- I love it in fact. It's just terribly difficult to install the Python bindings, especially on a Mac (see all the SO questions about installing pycairo on OS X). Are there better alternatives?

Edit:

For a little more context, I'm creating a web service that I would like to be simple to deploy, ideally using standard installation channels; not being able to simply use pip or easy_install introduces complexity into the deployment process on many deployment platforms. Additionally, I'd like it to be easy for anyone to set up a virtual environment and do development on the application on their local machine. Again, ease of installation is an important point here.

Grazynagreabe answered 9/10, 2011 at 14:17 Comment(4)
...define "better"? By what criteria are you judging?Preen
@André: Apparently, by ease of installation on a Mac.Guelph
@AndréCaron good point; I provided a little more context above.Grazynagreabe
I love cairo for desktop gui apps, but for online stuff I am considering the use of HTML5 Canvas element. Well, just an idea ;o)Secretive
S
7

Kiva, part on Enable, is a library which abstracts the vector renderer. It supports cairo, Agg, and several other renderers, though Agg is the default. It works on Linux, OS X and Windows.

Schroeder answered 9/10, 2011 at 19:23 Comment(2)
oops, I forgot, on OS X, the default is the native Quartz renderer.Schroeder
Why don’t you update your answer by editing it instead of making an addendum comment?Lepidus
C
4

cairocffi installs cleanly with pip/virtualenv and provides the same API as pycairo. http://packages.python.org/cairocffi/

Canker answered 8/1, 2013 at 12:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.