igraph 库错误 - 已弃用的库

Error with igraph library - deprecated library

我已将我的计算机更改为 Linux Mint x64 OS,当我尝试执行我制作的旧程序时,我遇到了 python 库、igraph 库的问题.

DeprecationWarning: To avoid name collision with the igraph project, this visualization library has been renamed to 'jgraph'. Please upgrade when convenient.

我找不到有关如何为新库更改代码的信息。 在 Win8 PC 上,通过 pip 安装,它可以完美运行,但我无法使用 Mint 在我的 PC 上运行它。 使用

进行的正常安装

sudo apt-get install python-igraph

安装 0.6.5-1 库版本。 我也试过用 pip 安装它,但它给了我同样的错误 但安装的版本是 igraph-0.1.11-py2.py3-none-any.whl

我只使用图表 class

from igraph import Graph

我需要做些什么来更改我的代码以使其与新库一起工作?我错过了什么吗?

编辑:它在我的笔记本电脑上使用 Mint x86 OS,库版本 0.6.5-1

我认为你安装了错误的 igraph 库。

这个 igraph(0.1.11) is the one you installed, while this igraph(0.7.1) 就是您需要的(以及著名的 iGraph)。

  • 使用 pip(安装后),只需执行以下操作:

    sudo pip 卸载 igraph

  • 然后使用 pip 或 apt-get 安装 python-igraph-0.7.1 包,如下面的评论所述:

    sudo pip 安装python-igraph

希望有用。

sudo -H pip uninstall igraph

然后:

sudo pip install python-igraph

对我有用。