I am trying to create a plot with python igraph:
from igraph import *
vertices = ["one", "two", "three"]
edges = [(0,2),(2,1),(0,1)]
g = Graph(vertex_attrs={"label": vertices}, edges=edges, directed=True)
plot(g)
I have installed all of these:
sudo apt-get install libffi-dev
sudo pip install cffi
sudo pip install cairocffi
And I still get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/chovanec/anaconda3/lib/python3.5/site-packages/igraph/drawing/__init__.py", line 446, in plot
result = Plot(target, bbox, background=kwds.get("background", "white"))
File "/home/chovanec/anaconda3/lib/python3.5/site-packages/igraph/drawing/__init__.py", line 117, in __init__
self._surface_was_created = not isinstance(target, cairo.Surface)
AttributeError: module 'cairo' has no attribute 'Surface'
I can't find what's causing it.