使用 Python 2.7.9 Anaconda 2.2.0 在 Mac osx 10.10.2 上编译 igraph 的 C 核心时出现问题

Problems compiling C core of igraph with Python 2.7.9 Anaconda 2.2.0 on Mac osx 10.10.2

不知道有没有人遇到过类似的问题并找到了解决办法?我正在尝试在 Mac osx 10.10.2.

上使用 Python 2.7.9 Anaconda 2.2.0 安装 igraph

我设法 brew install homebrew/science/igraph 好,但是当我尝试 pip install python-igraph 我收到以下错误:

   grep: /usr/lib/libiconv.la: No such file or directory
        sed: /usr/lib/libiconv.la: No such file or directory
        libtool: link: `/usr/lib/libiconv.la' is not a valid libtool archive
        make[3]: *** [libigraph.la] Error 1
        make[2]: *** [all] Error 2
        make[1]: *** [all-recursive] Error 1
        make: *** [all] Error 2

    Extracting igraph-0.7.1.tar.gz...
    Configuring igraph...
    Could not download and compile the C core of igraph.


    ----------------------------------------
    Command "/Users/Angela/anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/x5/_j73bjsn10b5q1y_z904g3n40000gn/T/pip-build-nR59Ui/python-igraph/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/x5/_j73bjsn10b5q1y_z904g3n40000gn/T/pip-e3LVvv-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/x5/_j73bjsn10b5q1y_z904g3n40000gn/T/pip-build-nR59Ui/python-igraph

我也试过 sudo pip,结果也一样。任何关于下一步尝试的建议将不胜感激

找到解决方案,我必须先 brew install pkg-config,希望这能帮助遇到同样错误的其他人