解决ubuntu安装python-igraph时出现的Could not download and compile the C core of igraph问题

在Ubuntu上安装python-igraph时遇到Could not download and compile the C core的问题。通过尝试多种方法,发现只需安装pkg-config即可解决。安装pkg-config后,pip能正确编译并链接到C core,从而成功安装python-igraph。
摘要由CSDN通过智能技术生成
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发行版中 ,

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值