pip install python-igraph 报错,C core of igraph 没有安装。

在CentOS7上通过pip安装python-igraph时遇到错误,提示C core of igraph未安装。尝试多种网络方法无效后,通过手动下载igraph源码并指定安装路径成功解决。步骤包括下载igraph源文件,解压,然后使用pip安装时添加--c-core-url选项指定igraph源文件路径。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

(一)问题描述

        Centos7 安装python-igraph时,pip install python-igraph 报错,C core of igraph 没有安装。

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.

 

Cannot find the C core of igraph on this system using pkg-config.

   

We will now try to download and compile the C core from scratch.

Version number of the C core: 0.7.1.post6

We will also try: 0.7.1

   

Version 0.7.1.post6 of the C core of igraph is not found among the nightly builds.

   

Use the --c-core-version switch to try a different version.

Could not download and compile the C core of igraph.

 

二)解决办法

        网上的方法都试过,搞了好几天,焦头烂额,也没有整出来。最后看了源码。才知道它安装的时候,会下载igraph。也就是C core。具体解决方法:

     1. 下载:igraph-0.7.1.tar

     2. 解压:tar -zxvf igraph-0.7.1.tar.gz

     3.安装:

./configure 

make

make install

     4. 在安装pip install python-igraph,命令如下:

        pip install -v python-igraph --install-option="--c-core-url=【igraph路径】/igraph-0.7.1.tar.gz"

        pip install -v python-igraph --install-option="--c-core-url=http://127.0.0.1/imagedeps/igraph-0.7.1.tar.gz"
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值