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发行版中 ,