igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] still cannot plot degree distribution


From: Tamás Nepusz
Subject: Re: [igraph] still cannot plot degree distribution
Date: Wed, 21 Sep 2016 10:02:15 +0200

You have compiled igraph for Python 3.5, so you cannot import it in 2.7.

Plotting requires the Cairo module for Python. Please compile and install Cairo for Python 3.5 and retry.

T. 

On 2016. Sep 21., at 8:49, <address@hidden> <address@hidden> wrote:


Thank you Tamas. But still I can't go forward by both of python2.7 nor python3.5.1...

when I run it by python2.7, I got:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-9e06b667a294> in <module>()
----> 1 import igraph
      2 from igraph import plot
      3 
      4 g = igraph.Graph.Read("/home/sizheng/hdg/sizheng/myfitness/1/3_1_5000.edges",format="edgelist")
      5 

/usr/lib64/python2.7/site-packages/igraph/__init__.py in <module>()
     32 # pylint: disable-msg=W0401
     33 # W0401: wildcard import
---> 34 from igraph._igraph import *
     35 from igraph._igraph import __version__, __build_date__
     36 from igraph.clustering import *

ImportError: /usr/lib64/python2.7/site-packages/igraph/_igraph.so: undefined symbol: _ZTVN10__cxxabiv121__vmi_class_type_infoE

when I run it by python3.5.1, I got:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-40f2a8de40be> in <module>()
      1 dd = g.degree_distribution()
----> 2 plot(dd).show()

/usr/local/lib/python3.5/site-packages/igraph/drawing/__init__.py in plot(obj, target, bbox, *args, **kwds)
    444         bbox = BoundingBox(bbox)
    445 
--> 446     result = Plot(target, bbox, background=kwds.get("background", "white"))
    447 
    448     if "margin" in kwds:

/usr/local/lib/python3.5/site-packages/igraph/drawing/__init__.py in __init__(self, target, bbox, palette, background)
    115         """
    116         self._filename = None
--> 117         self._surface_was_created = not isinstance(target, cairo.Surface)
    118         self._need_tmpfile = False
    119 

/usr/local/lib/python3.5/site-packages/igraph/drawing/utils.py in __getattr__(self, _)
    394 
    395     def __getattr__(self, _):
--> 396         raise TypeError("plotting not available")
    397     def __call__(self, _):
    398         raise TypeError("plotting not available")

TypeError: plotting not available


Regards,
sizheng
_______________________________________________
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]