Hi Group: I would appreciate if someone can help regarding whak cairo to
install and how to run with python3. I have successfully installed
python-igraph and everything works fine. However, as suggested, I installed
cairo (from Apple App), that didn't work, so I installed  pycairo as
suggested in
https://stackoverflow.com/questions/36225410/installing-cairo-and-pycairo-mac-osx
However, I am still getting error-
import igraph
from igraph import *
g = Graph([(0,1), (0,2), (2,3), (3,4), (4,2), (2,5), (5,0), (6,3), (5,6)])
layout = g.layout("kk")
plot(g, layout = layout)

I get the following error:

TypeError                                 Traceback (most recent call
last)<ipython-input-6-7287e5fd2e0f> in <module>()      7
print(g.degree())      8 layout = g.layout("kk")----> 9 plot(g, layout
= layout)
~/anaconda3/lib/python3.6/site-packages/igraph/drawing/__init__.py in
plot(obj, target, bbox, *args, **kwds)    453         bbox =
BoundingBox(bbox)    454 --> 455     result = Plot(target, bbox,
background=kwds.get("background", "white"))    456     457     if
"margin" in kwds:
~/anaconda3/lib/python3.6/site-packages/igraph/drawing/__init__.py in
__init__(self, target, bbox, palette, background)    118         """
 119         self._filename = None--> 120
self._surface_was_created = not isinstance(target, cairo.Surface)
121         self._need_tmpfile = False    122
~/anaconda3/lib/python3.6/site-packages/igraph/drawing/utils.py in
__getattr__(self, _)    394     395     def __getattr__(self, _):-->
396         raise TypeError("plotting not available")    397     def
__call__(self, _):    398         raise TypeError("plotting not
available")
TypeError: plotting not available

Thank you. Sid
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to