简体   繁体   English

为python 3.4 pip安装igraph:编译器错误

[英]pip install igraph for python 3.4: compiler error

I want to install python-igraph for Python 3.4 on Mac OSX 10.10. 我想在Mac OSX 10.10上为Python 3.4安装python-igraph

When I do 当我做

jenny$ pip3 install python-igraph

I get 我懂了

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

I checked out this similar question , and the linked githib issue and then tried 我检查了这个类似的问题 ,并链接了githib问题 ,然后尝试

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

based on the information I found, with essentially the same error. 根据我发现的信息,基本上具有相同的错误。

Based on the comments in that stackoverflow question, I also tried looking for the developer branch of python-igraph on github but I can't find it. 基于该stackoverflow问题中的评论,我还尝试在github上寻找python-igraph的开发人员分支,但我找不到它。

I'm a little lost. 我有点迷路了。 Can anyone tell me how to install this? 谁能告诉我该如何安装?

Do you have ac compiler installed? 您是否安装了交流编译器? How about Xcode Command Line Tools? Xcode命令行工具怎么样?

Try executing the following from your terminal: 尝试从终端执行以下命令:

xcode-select --install

And click the "Install" button on the pop-up window. 然后单击弹出窗口上的“安装”按钮。

After it's installed, verify the Xcode Command Line Tools installation with: 安装完成后,请使用以下命令验证Xcode命令行工具的安装:

gcc --version

Then try your pip3 installation again. 然后再次尝试安装pip3。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM