python + igraph “plotting not available”

前端 未结 3 1089
栀梦
栀梦 2020-12-10 01:12

I installed python-igraph 0.5.4 and igraph 0.5.4 (also tested 0.6) from source on a RHEL machine. All is fine except when I try to plot I get.

\"TypeError: plotting

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-10 01:33

    I had the same problem on my MacBook so I wanted to share my solution.

    I tried to install pycairo, py2cairo. The installation seemed to be okay but then:

    1. I could not import pycairo
    2. igraph's plot would not work.

    The following solved the igraph plotting issue:

    sudo pip install cairocffi
    

    or just

    pip install cairocffi
    

    So instead of pycairo I used cairocffi and this did the trick.

提交回复
热议问题