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

标签 python igraph

不知道有没有人遇到过类似的问题并找到了解决方案?我正在尝试在 Mac osx 10.10.2 上使用 Python 2.7.9 Anaconda 2.2.0 安装 igraph。

我设法 brew install homebrew/science/igraph OK,但是当我尝试 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,希望这能帮助遇到同样错误的其他人

关于python - 在 Mac osx 10.10.2 上使用 Python 2.7.9 Anaconda 2.2.0 编译 igraph 的 C 核心时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29589696/

相关文章:

python - 需要帮助在 python3 中解析 html,对于 xml.etree.ElementTree 来说格式不够好

python - 限制并行工作的线程数

python - 在 Django 管理中,包括 auth.User 作为内联

调整窗口大小并设置最小边距

python - 使用 R/igraph,有没有办法在考虑唯一节点属性的计数的情况下找到节点之间的最短路径?

r - igraph:解决紧密重叠的节点

R 无法在 conda 环境中加载 igraph

python - 如何获得每个社区的直径

python - 如何使用字符串 [django] 访问 python 模块变量

python - 从另一个 Python 文件执行函数时遇到问题