pip install python-igraph
在使用pip安装igraph时遇到了Could not download and compile the C core of igraph,在网上查阅并尝试了多种解决方法,很多都失败了,但其实只需要很简单的一步就可以成功安装igraph了,下面记录一下我踩的坑
- 缺少编译igraph所需要的库,下载libigraph0-dev即可 fail
sudo apt-get install -y libigraph0-dev
然而实际上我安装完这个库之后,还是会报上面一样的错误。
- 不使用pip安装,采用如下方式 fail
sudo add-apt-repository ppa:igraph/ppa # Add the Launchpad repository to apt
sudo apt-get update # update your package database
sudo apt-get install python-igraph
报错E: The repository 'http://ppa.launchpad.net/igraph/ppa/ubuntu bionic Release' does not have a Release file.
- 安装pkg-config success
在官网可以了解到,从版本0.5开始,igraph库的C core不包含在Python发行版中 ,必须单独编译和安装C core。在ubuntu中,需要下载buil

在Ubuntu上安装python-igraph时遇到Could not download and compile the C core的问题。通过尝试多种方法,发现只需安装pkg-config即可解决。安装pkg-config后,pip能正确编译并链接到C core,从而成功安装python-igraph。
最低0.47元/天 解锁文章
2282

被折叠的 条评论
为什么被折叠?



