gpt4 book ai didi

python - pip 为 python 3.4 安装 igraph : compiler error

转载 作者:太空宇宙 更新时间:2023-11-04 03:34:38 27 4
gpt4 key购买 nike

我要安装python-igraph适用于 Mac OSX 10.10 上的 Python 3.4。

当我这样做

jenny$ pip3 install python-igraph

我明白了

checking whether the C compiler works... no

configure: error: in `/private/var/folders/q7/jc5nc2px3p1_sr6gnj7749wc0000gq/T/pip_build_jenny/python-igraph/tmp/igraph.p_05kabc/igraph-0.7.1':

configure: error: C compiler cannot create executables

See `config.log' for more details



Extracting igraph-0.7.1.tar.gz...

Configuring igraph...

Could not download and compile the C core of igraph.



----------------------------------------
Cleaning up...
Command /Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 -c "import setuptools, tokenize;__file__='/private/var/folders/q7/jc5nc2px3p1_sr6gnj7749wc0000gq/T/pip_build_jenny/python-igraph/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/q7/jc5nc2px3p1_sr6gnj7749wc0000gq/T/pip-vudi0il0-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/q7/jc5nc2px3p1_sr6gnj7749wc0000gq/T/pip_build_jenny/python-igraph

我 checkout this similar question , 以及链接的 githib issue然后尝试

pip3 install python-igraph --install-option="--c-core-version=0.7.1"

根据我查到的信息,基本上是一样的错误。

根据该 stackoverflow 问题中的评论,我还尝试寻找 python-igraph on github 的开发人员分支但我找不到它。

我有 pip 迷茫。谁能告诉我如何安装这个?

最佳答案

你有安装c编译器吗?Xcode 命令行工具怎么样?

尝试从您的终端执行以下命令:

xcode-select --install

然后 pip 击弹出窗口中的“安装”按钮。

安装后,使用以下命令验证 Xcode 命令行工具安装:

gcc --version

然后再次尝试安装 pip3。

关于python - pip 为 python 3.4 安装 igraph : compiler error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33551224/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com