igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] igraph and python3


From: Tamas Nepusz
Subject: Re: [igraph] igraph and python3
Date: Fri, 4 Dec 2015 14:57:25 +0100

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 <address@hidden> 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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]