如何在 Ubuntu 8.04 LTS 64 位上安装 python-igraph?

发布于 2024-07-20 14:57:18 字数 1363 浏览 10 评论 0原文

显然,libigraphpython-igraph 是地球上唯一不能通过 apt-geteasy_install 安装的软件包代码> Ubuntu 8.04 LTS 64 位下。

从源代码安装两者似乎都很顺利......直到我尝试使用它们。

当我运行 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

有人能指出我正确的方向吗?

Apparently libigraph and python-igraph are the only packages on earth that can't be installed via apt-get or easy_install under Ubuntu 8.04 LTS 64-bit.

Installing both from source from source on seems to go smoothly...until I try to use them.

When I run python I get:

>>> 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

or (if I use the easy_install version of python-igraph)

>>> 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

I grabbed the source from here

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

Can anybody point me in the right direction?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

帅气称霸 2024-07-27 14:57:18

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

至于 easy_install 版本中的“找不到库”错误,我会尝试以下操作:

  1. sudo Updatedb”(更新定位数据库)
  2. locate libigraph.so.0<” /code>'(查找此文件在系统上的位置。如果您进行了 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'

How did you compile? Did you do a make install (if there was any).

As for the 'library not found' error in the easy_install version, i'd try the following:

  1. 'sudo updatedb' (to update the locate database)
  2. 'locate libigraph.so.0' (to find where this file is on your system. If you did a make install it could have went to /usr/local/lib ... or is it in the python lib dir?)
  3. Find out if the directory where this file is in is missing from your current LD_LIBRARY_PATH ('echo $LD_LIBRARY_PATH').
  4. If this directory is not in here, add it try 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/yourdirhere' (make it permanent by adding it to /etc/ld.so.conf) / 'ldconfig -n /yourdirhere'
沙沙粒小 2024-07-27 14:57:18

请注意,自 2009 年 11 月 8 日起,Launchpad 提供 igraph 的官方 Ubuntu 软件包。请参阅相应的 页面 在 Launchpad 上查看说明。 与早期的 Debian 软件包存储库不同,它应该适用于 32 位和 64 位架构。

Note that there are official Ubuntu packages for igraph available from Launchpad as of 8 Nov 2009. See the corresponding page on Launchpad for instructions. Unlike the earlier Debian package repository, this should work on both 32-bit and 64-bit architectures.

我ぃ本無心為│何有愛 2024-07-27 14:57:18

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

Where is libigraph.so.0 ? It doesn't seem to be in a location that python looks for such as /usr/lib , /usr/local/lib etc.

趴在窗边数星星i 2024-07-27 14:57:18

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

I followed the steps in http://socialsynergyweb.org/network/blog/install-python-igraph-ubuntu-904-64-bit. Also to run the actual igraph , i used the script python-igraph-0.5.2/scripts/igraph. Now i am able to use the igraph . If I dont use the scripts/igraph script i get the same error you are getting.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文