[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] igraph plot problem with python
From: |
Simone Gabbriellini |
Subject: |
Re: [igraph] igraph plot problem with python |
Date: |
Sun, 7 Sep 2008 15:45:38 +0200 |
Hi again Tamas,
here's my news...
I have installed cairo via fink, then i have downloaded a compatible
version of pycairo (1.0.2)...
here my results:
iMac:pycairo-1.0.2 ogabbrie$ python setup.py build
running build
running build_py
package init file 'cairo/__init__.py' not found (or not a regular file)
package init file 'cairo/__init__.py' not found (or not a regular file)
running build_ext
thank you,
simone
Il giorno 07/set/08, alle ore 13:07, Tamas Nepusz ha scritto:
Hi Simone,
I am trying to read and plot a .net file. everything run smoothly
unless I try to call the plot function: [...]
It is strange, since cairo is on my system (I use it with R)...
It's not enough to have Cairo on your system, what you need is the
Python interface for Cairo as well. You can check whether you have
it or not by trying to import it in the Python shell:
>>> import cairo
In fact, that's what igraph does in order to check whether Cairo is
installed or not. In case of an ImportError, igraph creates a "fake"
cairo module temporarily that just throws an exception with every
single function call saying that plotting is not available.
So, anyway, make sure you have the Python interface for Cairo. If
not, download it and try to compile it:
http://cairographics.org/releases/pycairo-1.4.12.tar.gz
It should compile by the usual python setup.py build && sudo python
setup.py install way if you have Cairo installed (but make sure you
call MacPython's python executable and not the built-in one,
otherwise the Python bindings of Cairo get installed for the built-
in Python and not MacPython). The one shipped with R might not be
enough, though, as it is buried somewhere in a non-standard path
inside /Applications/R.app/whatever, so I installed the Cairo
libraries from fink and then compiled pycairo.
--
Tamas
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help