Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you install PyCairo (Cairo for Python) on Windows?

Tags:

I spent hours this afternoon trying to find a straightforward tutorial for installing PyCairo on Windows.

The Cairo project itself does not maintain Windows binaries, they must be dowloaded elsehere (e.g. http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/).

The process is also complicated further apparently by the fact that MSVC is apparently not a supported compiler for PyCairo (although the source patch is simple). See this bug report:

https://www.libreoffice.org/bugzilla/show_bug.cgi?id=22940

Can anyone recommend a tutorial for installing PyCairo on Windows?

like image 281
Claynoik Avatar asked Jan 02 '12 19:01

Claynoik


People also ask

What is Cairocffi?

cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of Python bindings and object-oriented API for cairo. Cairo is a 2D vector graphics library with support for multiple backends including image buffers, PNG, PostScript, PDF, and SVG file output.


1 Answers

You should try windows binary installers from Gohlke repository for pyCairo and py2Cairo.

I never used pyCairo myself but took 4 minutes to install and get my first png example file done.

like image 131
joaquin Avatar answered Sep 21 '22 07:09

joaquin