Hello guys, I’m having a lot of troubles trying to use igraph.
Whatever I do or write, when I run the code, it generates always this message:
C:\Users\Marco\PycharmProjects\ortuproject\venv\Scripts\python.exe “C:/Users/Marco/PycharmProjects/ortuproject/Teoria Dei Grafi_script con NetworkX.py”
Traceback (most recent call last):
File “C:/Users/Marco/PycharmProjects/ortuproject/Teoria Dei Grafi_script con NetworkX.py”, line 1, in
from igraph import *
File “C:\Users\Marco\PycharmProjects\ortuproject\venv\lib\site-packages\igraph_init_.py”, line 35, in
from igraph.clustering import *
File “C:\Users\Marco\PycharmProjects\ortuproject\venv\lib\site-packages\igraph\clustering.py”, line 36, in
from igraph.drawing.colors import ClusterColoringPalette
File “C:\Users\Marco\PycharmProjects\ortuproject\venv\lib\site-packages\igraph\drawing_init_.py”, line 30, in
from igraph.drawing.graph import DefaultGraphDrawer
File “C:\Users\Marco\PycharmProjects\ortuproject\venv\lib\site-packages\igraph\drawing\graph.py”, line 27, in
from igraph.drawing.edge import ArrowEdgeDrawer
File “C:\Users\Marco\PycharmProjects\ortuproject\venv\lib\site-packages\igraph\drawing\edge.py”, line 17, in
cairo = find_cairo()
File “C:\Users\Marco\PycharmProjects\ortuproject\venv\lib\site-packages\igraph\drawing\utils.py”, line 413, in find_cairo
module = import(module_name)
File “C:\Users\Marco\PycharmProjects\ortuproject\venv\lib\site-packages\cairocffi_init_.py”, line 50, in
(‘libcairo.so’, ‘libcairo.2.dylib’, ‘libcairo-2.dll’))
File “C:\Users\Marco\PycharmProjects\ortuproject\venv\lib\site-packages\cairocffi_init_.py”, line 45, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called “cairo” was found
no library called “libcairo-2” was found
cannot load library ‘libcairo.so’: error 0x7e
cannot load library ‘libcairo.2.dylib’: error 0x7e
cannot load library ‘libcairo-2.dll’: error 0x7e
a guy told me to install Cairo from the site cairographics / download
but I’m a noob and I don’t understand he instructions. I tried to follow this one:
From Dominic Lachowicz:
Since GTK+ 2.8 and newer depends on Cairo, you can have Cairo installed on Win32 as a side-effect of installing GTK+. For example, see [The Glade/GTK+ for Windows Toolkit](gladewin32 sourceforge).
but what shoul Ido with GTK? trying pip install gtk? or install some stuff from this page?
also gtk site at the download page gives the 404 error.
I apologise if I committed some formal error writing, this is my first question but I need to learn igraph for a thesis project and I’m afraid that alone i would be stuck.