python安装igraph库过程中防止报错终极方法

最初用pip install igraph命令安装之后,在python中加载igraph库(from igraph import *)报错,报错信息如下:

“DeprecationWarning: To avoid name collision with the igraph project, this visualization library has been renamed to 'jgraph'. Please upgrade when convenient.”
参考一位博主的文章操作后

https://blog.csdn.net/piaomiao9165/article/details/79622992

又出现了错误

“Cannot find the C core of igraph on this system using pkg-config”缺少C模块。

解决方法:在https://www.lfd.uci.edu/~gohlke/pythonlibs/

上下载不需要C模块的igraph库(需要对应自己的python版本和系统位数,我的是python3.6,系统64位,选择如下):

python安装igraph库过程中防止报错终极方法

然后进入保存该文件的文件夹,使用pip install python_igraph-0.7.1.post6-cp36-cp36m-win_amd64.whl命令安装即可。

python安装igraph库过程中防止报错终极方法

检验:

python安装igraph库过程中防止报错终极方法

python中没有报错,安装成功。