pip install igraph for python 3.4: 编译器错误

pip install igraph for python 3.4: compiler error

我想在 Mac OSX 10.10 上为 Python 3.4 安装 python-igraph

当我做的时候

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

我查看了 this similar question, and the linked githib issue 然后尝试了

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

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

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

我有点迷路了。谁能告诉我如何安装这个?

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

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

xcode-select --install

然后单击弹出窗口中的 "Install" 按钮 window。

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

gcc --version

然后再次尝试安装 pip3。