Question

I just fixed a bug in a two year old python program and now I'm having big trouble getting it to compile again. I simply cannot get Python, Cairo, wx and distutils to work together.

On OSX I managed to get Python 2.7 to import Cairo and WX but py2app does not work. The error is something about unknown architecture.

On Windows 7 I have not been able to successfully import cairo. I installed py2cairo and put the libcairo-2.dll in Windows/System32 but still get an import error. I even copied msvcr90.dll to System32 but still no luck.

Does anyone have a combination of Python, wx, Py2cairo, Cairo and distutils that just works? I need Python 2.6 or 2.7 32 bit on OSX and Windows.

Was it helpful?

Solution

I got it to work on OSX by installing an older version of XCode form the SnowLeopard DVD. You also have to be very careful with paths to data files because py2app puts everything into a zip file.

py2exe was worse because it did not copy dynamically loaded modules and one dependency from pytz into the repo and needed some ugly hacks in setup.py.

I ended up using cairo-1.10.2, libpng-1.2.49 and pixman-0.20.2

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top