Re: [igraph] igraph for python plotting using pycairo on mac OScatalina (10.15.4)

2020-03-30 Thread Siddhartha R Dalal
thank you all.  the best way to install python-igraph with all dependencies
is to use anaconda.  "conda install -c conda-forge python-igraph".
that solved plotting issues.

best. sid

On Mon, Mar 30, 2020 at 4:05 AM Szabolcs Horvát  wrote:

> For readers who are not aware, this question was cross-posted (and
> answered) at:
>
>
> https://igraph.discourse.group/t/igraph-for-python3-plotting-using-pycairo-on-mac-oscatalina-10-15-4/162
>
> Please use https://igraph.discourse.group/ for future questions.
>
> On Mon, 30 Mar 2020 at 09:59, serafim loukas  wrote:
>
>> Hi Sid,
>>
>> Have a look here: https://stackoverflow.com/a/45416251/5025009
>>
>> Makis
>>
>> On 30 Mar 2020, at 09:56, Tamas Nepusz  wrote:
>>
>> import pycairo from
>>
>>
>> ___
>> igraph-help mailing list
>> igraph-help@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] igraph for python plotting using pycairo on mac OScatalina (10.15.4)

2020-03-30 Thread Szabolcs Horvát
For readers who are not aware, this question was cross-posted (and
answered) at:

https://igraph.discourse.group/t/igraph-for-python3-plotting-using-pycairo-on-mac-oscatalina-10-15-4/162

Please use https://igraph.discourse.group/ for future questions.

On Mon, 30 Mar 2020 at 09:59, serafim loukas  wrote:

> Hi Sid,
>
> Have a look here: https://stackoverflow.com/a/45416251/5025009
>
> Makis
>
> On 30 Mar 2020, at 09:56, Tamas Nepusz  wrote:
>
> import pycairo from
>
>
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] igraph for python plotting using pycairo on mac OScatalina (10.15.4)

2020-03-30 Thread serafim loukas
Hi Sid,

Have a look here: https://stackoverflow.com/a/45416251/5025009

Makis

On 30 Mar 2020, at 09:56, Tamas Nepusz 
mailto:nta...@gmail.com>> wrote:

import pycairo from

___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Re: [igraph] igraph for python plotting using pycairo on mac OScatalina (10.15.4)

2020-03-30 Thread Tamas Nepusz
Hi,

python-igraph simply tries to import pycairo or cairocffi when it
initializes the plotting module. If the import fails, it simply throws a
"plotting not available" exception for all plotting attempts. So, to figure
out what's wrong, try to import pycairo from the same Python session where
you see this error -- this should give you a hint about what's wrong. Most
likely pycairo is not installed correctly.

T.


On Sun, 29 Mar 2020 at 22:11, Siddhartha R Dalal 
wrote:

> Hi Group: I would appreciate if someone can help regarding whak cairo to
> install and how to run with python3. I have successfully installed
> python-igraph and everything works fine. However, as suggested, I installed
> cairo (from Apple App), that didn't work, so I installed  pycairo as
> suggested in
> https://stackoverflow.com/questions/36225410/installing-cairo-and-pycairo-mac-osx
> However, I am still getting error-
> import igraph
> from igraph import *
> g = Graph([(0,1), (0,2), (2,3), (3,4), (4,2), (2,5), (5,0), (6,3), (5,6)])
> layout = g.layout("kk")
> plot(g, layout = layout)
>
> I get the following error:
>
> TypeError Traceback (most recent call 
> last) in ()  7 print(g.degree())
>   8 layout = g.layout("kk")> 9 plot(g, layout = layout)
> ~/anaconda3/lib/python3.6/site-packages/igraph/drawing/__init__.py in 
> plot(obj, target, bbox, *args, **kwds)453 bbox = 
> BoundingBox(bbox)454 --> 455 result = Plot(target, bbox, 
> background=kwds.get("background", "white"))456 457 if "margin" in 
> kwds:
> ~/anaconda3/lib/python3.6/site-packages/igraph/drawing/__init__.py in 
> __init__(self, target, bbox, palette, background)118 """119   
>   self._filename = None--> 120 self._surface_was_created = not 
> isinstance(target, cairo.Surface)121 self._need_tmpfile = False   
>  122
> ~/anaconda3/lib/python3.6/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
>
> Thank you. Sid
>
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


[igraph] igraph for python plotting using pycairo on mac OScatalina (10.15.4)

2020-03-29 Thread Siddhartha R Dalal
Hi Group: I would appreciate if someone can help regarding whak cairo to
install and how to run with python3. I have successfully installed
python-igraph and everything works fine. However, as suggested, I installed
cairo (from Apple App), that didn't work, so I installed  pycairo as
suggested in
https://stackoverflow.com/questions/36225410/installing-cairo-and-pycairo-mac-osx
However, I am still getting error-
import igraph
from igraph import *
g = Graph([(0,1), (0,2), (2,3), (3,4), (4,2), (2,5), (5,0), (6,3), (5,6)])
layout = g.layout("kk")
plot(g, layout = layout)

I get the following error:

TypeError Traceback (most recent call
last) in ()  7
print(g.degree())  8 layout = g.layout("kk")> 9 plot(g, layout
= layout)
~/anaconda3/lib/python3.6/site-packages/igraph/drawing/__init__.py in
plot(obj, target, bbox, *args, **kwds)453 bbox =
BoundingBox(bbox)454 --> 455 result = Plot(target, bbox,
background=kwds.get("background", "white"))456 457 if
"margin" in kwds:
~/anaconda3/lib/python3.6/site-packages/igraph/drawing/__init__.py in
__init__(self, target, bbox, palette, background)118 """
 119 self._filename = None--> 120
self._surface_was_created = not isinstance(target, cairo.Surface)
121 self._need_tmpfile = False122
~/anaconda3/lib/python3.6/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

Thank you. Sid
___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help