Brilliant, thanks Bryce! cairocffi (imported as cairo) gets igraph plotting to work! Thanks!<div><br></div><div>Nick<br><br><div class="gmail_quote">On Thu Jan 08 2015 at 3:18:36 PM Bryce Harrington <<a href="mailto:bryce@osg.samsung.com" target="_blank">bryce@osg.samsung.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What version of cairo are you loading?  pycairo hasn't been updated in a<br>
while so you could try against an older cairo.<br>
<br>
If you need newer cairo with python, you could look at cairocffi<br>
(<a href="https://pypi.python.org/pypi/cairocffi/" target="_blank">https://pypi.python.org/pypi/<u></u><u></u>cairocffi/</a>).<br>
<br>
Bryce<br>
<br>
On Thu, Jan 08, 2015 at 08:45:25PM +0000, Nick Eubank wrote:<br>
> Top lines of Crash Report (if it helps -- whole report too large for this<br>
> list):<br>
><br>
> Process:               Python [29949]<br>
> Path:<br>
>  /Users/USER/Library/Enthought/<u></u><u></u>*/Python.app/Contents/MacOS/<u></u>Py<u></u>thon<br>
> Identifier:            org.python.python<br>
> Version:               2.7.6 (2.7.6)<br>
> Code Type:             X86-64 (Native)<br>
> Parent Process:        python.noapp [29820]<br>
> Responsible:           bash [29814]<br>
> User ID:               501<br>
><br>
> Date/Time:             2015-01-08 12:28:20.646 -0800<br>
> OS Version:            Mac OS X 10.10.1 (14B25)<br>
> Report Version:        11<br>
> Anonymous UUID:        C31616B5-ACF7-0BF8-668D-<u></u>F82563<u></u>980E54<br>
><br>
> Sleep/Wake UUID:       FC5CB9B2-921D-4F34-A22A-<u></u>63EDC<u></u>ED729FB<br>
><br>
> Time Awake Since Boot: 170000 seconds<br>
> Time Since Wake:       6500 seconds<br>
><br>
> Crashed Thread:        0  Dispatch queue: com.apple.main-thread<br>
><br>
> Exception Type:        EXC_CRASH (SIGABRT)<br>
> Exception Codes:       0x0000000000000000, 0x0000000000000000<br>
><br>
> Application Specific Information:<br>
> abort() called<br>
><br>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread<br>
> 0   libsystem_kernel.dylib         0x00007fff982dc282 __pthread_kill + 10<br>
> 1   libsystem_c.dylib             0x00007fff9081cb73 abort + 129<br>
> 2   org.python.python             0x0000000119b54811 Py_FatalError + 49<br>
> 3   org.python.python             0x0000000119b53bac PyThreadState_Get + 28<br>
> 4   org.python.python             0x0000000119b5000e Py_InitModule4_64 + 62<br>
> 5   _cairo.so                     0x0000000111e01851 init_cairo + 657<br>
> 6   org.python.python             0x00000001000e2351<br>
> _PyImport_LoadDynamicModule + 177<br>
> 7   org.python.python             0x00000001000e0a4b import_submodule + 315<br>
> 8   org.python.python             0x00000001000e0eea load_next + 234<br>
> 9   org.python.python             0x00000001000e11e0<br>
> PyImport_ImportModuleLevel + 336<br>
> 10  org.python.python             0x00000001000be5d3 builtin___import__ +<br>
> 131<br>
> 11  org.python.python             0x000000010000fe02 PyObject_Call + 98<br>
> 12  org.python.python             0x00000001000bf7b7<br>
> PyEval_CallObjectWithKeywords + 87<br>
> 13  org.python.python             0x00000001000c4c65 PyEval_EvalFrameEx +<br>
> 16885<br>
> 14  org.python.python             0x00000001000c8fb9 PyEval_EvalCodeEx +<br>
> 2137<br>
><br>
><br>
> On Thu Jan 08 2015 at 12:32:25 PM Nick Eubank <<a href="mailto:nickeubank@gmail.com" target="_blank">nickeubank@gmail.com</a>> wrote:<br>
><br>
> > Hi All,<br>
> ><br>
> > Trying to install Py2Cairo into an Enthought Canopy installation. Seems to<br>
> > work, but when I try to run "import cairo" I get "PyThreadState_Get: no<br>
> > current thread" and python crashes.<br>
> ><br>
> > Any suggestions? Configuration below:<br>
> ><br>
> ><br>
> > CONFIGURE:<br>
> ><br>
> > $ ./waf configure<br>
> > --libdir=/users/Nick/Library/<u></u>E<u></u>nthought/Canopy_64bit/User/<u></u>lib<br>
> > --prefix=~/Library/Enthought/<u></u>C<u></u>anopy_64bit/User<br>
> ><br>
> ><br>
> > CONFIGURE OUTPUT:<br>
> >   ./options()<br>
> ><br>
> > Setting top to                           :<br>
> > /Users/Nick/Downloads/<u></u>py2cairo<u></u>-1.10.0<br>
> ><br>
> > Setting out to                           :<br>
> > /Users/Nick/Downloads/<u></u>py2cairo<u></u>-1.10.0/build_<u></u>directory<br>
> ><br>
> >   ./configure()<br>
> ><br>
> > Checking for 'gcc' (c compiler)          : ok<br>
> ><br>
> > Checking for program python              :<br>
> > /Users/Nick/Library/Enthought/<u></u><u></u>Canopy_64bit/User/bin/python<br>
> ><br>
> > Checking for python version              : (2, 7, 6, 'final', 0)<br>
> ><br>
> > Checking for library python2.7           : yes<br>
> ><br>
> > Checking for program python2.7-config    : /opt/local/bin/python2.7-<u></u>confi<u></u>g<br>
> ><br>
> ><br>
> > Checking for header Python.h             : yes<br>
> ><br>
> > Checking for program pkg-config          : /opt/local/bin/pkg-config<br>
> ><br>
> > Checking for 'cairo' >= 1.10.0           : yes<br>
> ><br>
> > Configuration:<br>
> ><br>
> > PREFIX                                   :<br>
> > /Users/Nick/Library/Enthought/<u></u><u></u>Canopy_64bit/User<br>
> ><br>
> > LIBDIR                                   :<br>
> > /users/Nick/Library/Enthought/<u></u><u></u>Canopy_64bit/User/lib<br>
> ><br>
> > 'configure' finished successfully (3.032s)<br>
> ><br>
> > DN51ss1e:py2cairo-1.10.0 Nick$ ./waf build<br>
> ><br>
> >   ./options()<br>
> ><br>
> > Waf: Entering directory<br>
> > `/Users/Nick/Downloads/<u></u>py2cair<u></u>o-1.10.0/build_<u></u>directory'<br>
> ><br>
> >   ./build()<br>
> ><br>
> >   src/build()<br>
> ><br>
> > [1/9] subst: <a href="http://pycairo.pc.in" target="_blank">pycairo.pc.in</a> -> pycairo.pc<br>
> ><br>
> > Waf: Leaving directory<br>
> > `/Users/Nick/Downloads/<u></u>py2cair<u></u>o-1.10.0/build_<u></u>directory'<br>
> ><br>
> > 'build' finished successfully (0.094s)<br>
> ><br>
> > INSTALL OUTPUT:<br>
> ><br>
> >   ./options()<br>
> ><br>
> > Waf: Entering directory<br>
> > `/Users/Nick/Downloads/<u></u>py2cair<u></u>o-1.10.0/build_<u></u>directory'<br>
> ><br>
> >   ./build()<br>
> ><br>
> >   src/build()<br>
> ><br>
> > + install<br>
> > /Users/Nick/Library/Enthought/<u></u><u></u>Canopy_64bit/User/include/<u></u>pyca<u></u>iro/pycairo.h<br>
> > (from src/pycairo.h)<br>
> ><br>
> > + install<br>
> > /users/Nick/Library/Enthought/<u></u><u></u>Canopy_64bit/User/lib/python2.<u></u><u></u>7/site-packages/cairo/_cairo.<u></u>s<u></u>o<br>
> > (from build_directory/src/_cairo.so)<br>
> ><br>
> > + install<br>
> > /users/Nick/Library/Enthought/<u></u><u></u>Canopy_64bit/User/lib/<u></u>pkgconfi<u></u>g/pycairo.pc<br>
> > (from pycairo.pc)<br>
> ><br>
> > Waf: Leaving directory<br>
> > `/Users/Nick/Downloads/<u></u>py2cair<u></u>o-1.10.0/build_<u></u>directory'<br>
> ><br>
> > + install<br>
> > /users/Nick/Library/Enthought/<u></u><u></u>Canopy_64bit/User/lib/python2.<u></u><u></u>7/site-packages/cairo/__init__<u></u><u></u>.py<br>
> > (from src/__init__.py)<br>
> ><br>
> > + byte compiling<br>
> > '/users/Nick/Library/<u></u>Enthought<u></u>/Canopy_64bit/User/<u></u>lib/<u></u>python2.7/site-packages/<u></u>cairo/<u></u>__init__.py'<br>
> ><br>
> > 'install' finished successfully (0.777s)<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
<br>
> --<br>
> cairo mailing list<br>
> <a href="mailto:cairo@cairographics.org" target="_blank">cairo@cairographics.org</a><br>
> <a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.<u></u>org<u></u>/mailman/listinfo/cairo</a><br>
<br>
</blockquote></div></div>