【问题标题】:How to install python-igraph on Ubuntu 8.04 LTS 64-Bit?如何在 Ubuntu 8.04 LTS 64 位上安装 python-igraph?
【发布时间】:2010-10-24 11:03:15
【问题描述】:

显然libigraphpython-igraph 是地球上仅有的在Ubuntu 8.04 LTS 64 位下无法通过apt-geteasy_install 安装的软件包。

从源代码开始从源代码安装似乎进展顺利......直到我尝试使用它们。

当我运行 python 时,我得到:

>>> import igraph
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "igraph/__init__.py", line 30, in <module>
    from igraph.core import *
 ImportError: No module named core

或者(如果我使用 python-igraph 的 easy_install 版本)

>>> import igraph
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/igraph/__init__.py", line 30, in <module>
  File "build/bdist.linux-x86_64/egg/igraph/core.py", line 7, in <module>
  File "build/bdist.linux-x86_64/egg/igraph/core.py", line 6, in __bootstrap__
ImportError: libigraph.so.0: cannot open shared object file: No such file or directory

我从这里抓取了源代码

igraph 0.5.2 = http://igraph.sourceforge.net/download.html

python-igraph 0.5.2 = http://pypi.python.org/pypi/python-igraph/0.5.2

谁能指出我正确的方向?

【问题讨论】:

    标签: python 64-bit ubuntu-8.04 igraph


    【解决方案1】:

    你是怎么编译的?您是否进行了 make install(如果有的话)。

    对于easy_install版本中的“找不到库”错误,我会尝试以下方法:

    1. 'sudo updatedb'(更新定位数据库)
    2. 'locate libigraph.so.0'(查找此文件在您的系统上的位置。如果您进行了 make install,它可能会转到 /usr/local/lib ... 还是在 python lib 目录中?)
    3. 查看当前 LD_LIBRARY_PATH ('echo $LD_LIBRARY_PATH') 中是否缺少此文件所在的目录。
    4. 如果此目录不在此处,请将其添加尝试 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/yourdirhere'(通过将其添加到 /etc/ld.so.conf 使其永久化)/'ldconfig -n /yourdirhere'

    【讨论】:

    • libigraph.so 确实在 /usr/local/lib 中。我认为这是库的一个非常常见的位置,我猜 python 看起来不在那里?您的步骤在 2 秒内修复了它,谢谢!
    【解决方案2】:

    请注意,截至 2009 年 11 月 8 日,Launchpad 提供了 igraph 的官方 Ubuntu 软件包。有关说明,请参阅 Launchpad 上相应的page。与早期的 Debian 软件包存储库不同,这应该适用于 32 位和 64 位架构。

    【讨论】:

      【解决方案3】:

      libigraph.so.0 在哪里?它似乎不在 python 寻找的位置,例如 /usr/lib 、 /usr/local/lib 等。

      【讨论】:

        【解决方案4】:

        我按照http://socialsynergyweb.org/network/blog/install-python-igraph-ubuntu-904-64-bit 中的步骤进行操作。为了运行实际的 igraph,我使用了脚本 python-igraph-0.5.2/scripts/igraph。现在我可以使用 igraph 了。如果我不使用脚本/igraph 脚本,我会遇到与您相同的错误。

        【讨论】:

        • 链接失效,用户无效,全部丢失。
        猜你喜欢
        • 2013-07-23
        • 2017-08-17
        • 1970-01-01
        • 2014-07-21
        • 2014-01-20
        • 1970-01-01
        • 2018-03-04
        • 2016-12-22
        • 2014-01-14
        相关资源
        最近更新 更多