igraph is supported with Python 3, but it has to be compiled and
installed separately for Python 2.x and for Python 3.x. It seems like
in your case it is installed only for Python 2.x and typing "import
igraph" in Python 3.x imports some other file instead.

Try running "import igraph; print igraph.__file__" in Python 3.x to
figure out what file is imported as "igraph" in Python 3.x.

T.
T.


On Fri, Dec 4, 2015 at 2:35 PM, Nate Reed <[email protected]> wrote:
> I wrote a Python 2.7 script that uses igraph, but when I tried running in
> Python 3, it fails as follows:
>
>>>> from igraph import *
>>>> g = Graph(directed=True)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> NameError: name 'Graph' is not defined
>
> Is Python 3 supported? Is there documentation on use of igraph with Python3?
>
> Thanks,
> Nate
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>

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

Reply via email to