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

Claynoik picture Claynoik · Jan 2, 2012 · Viewed 40.4k times · Source

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?

Answer

joaquin picture joaquin · Jan 2, 2012

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.