2015-11-05 61 views
1

我想在Mac OSX 10.10安装python-igraph为Python 3.4。PIP为Python 3.4安装的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,并链接githib issue,然后根据我查到的资料试图

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

,与基本上是相同的错误。

基于该计算器问题的意见,我也尝试找的python-igraph on github开发分支,但我不能找到它。

我有点迷路。任何人都可以告诉我如何安装?

回答

1

您是否安装了c编译器? Xcode命令行工具如何?

尝试执行从终端如下:

xcode-select --install 

,并点击弹出窗口中的“安装”按钮。

它的安装后,验证Xcode的命令行工具安装有:

gcc --version 

然后再次尝试安装PIP3。

+0

是的。我安装了Xcode,但最近从Time Machine备份恢复了我的系统,并且需要再次接受Xcode许可证。当我做了sudo gcc --version时,我收到了一个要求接受许可协议的通知,所以很容易从那里找到答案。谢谢! – andbeonetraveler