2015-11-05 96 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