简体   繁体   中英

pip install igraph for python 3.4: compiler error

I want to install python-igraph for Python 3.4 on Mac OSX 10.10.

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

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.

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?

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:

gcc --version

Then try your pip3 installation again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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