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

时间:2022-09-01 10:05:08

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.

显然libigraph和python-igraph是地球上唯一无法通过Ubuntu 8.04 LTS 64位下的apt-get或easy_install安装的软件包。

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

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

When I run python I get:

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

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

或者(如果我使用easy_install版本的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

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-igraph 0.5.2 = http://pypi.python.org/pypi/python-igraph/0.5.2

Can anybody point me in the right direction?

任何人都能指出我正确的方向吗?

4 个解决方案

#1


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

你是怎么编的?你做了make install(如果有的话)吗?

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

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

  1. 'sudo updatedb' (to update the locate database)
  2. 'sudo updatedb'(更新定位数据库)

  3. '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?)
  4. '找到libigraph.so.0'(找到你的系统上这个文件的位置。如果你做了make install,它可以去/ usr / local / lib ...还是在python lib目录下?)

  5. Find out if the directory where this file is in is missing from your current LD_LIBRARY_PATH ('echo $LD_LIBRARY_PATH').
  6. 找出当前LD_LIBRARY_PATH('echo $ LD_LIBRARY_PATH')中是否缺少此文件所在的目录。

  7. 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'
  8. 如果此目录不在此处,请添加它尝试'export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/ yourdirhere'(通过将其添加到/etc/ld.so.conf使其永久化)/'ldconfig -n / yourdirhere'

#2


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.

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

#3


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.

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

#4


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.

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

#1


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

你是怎么编的?你做了make install(如果有的话)吗?

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

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

  1. 'sudo updatedb' (to update the locate database)
  2. 'sudo updatedb'(更新定位数据库)

  3. '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?)
  4. '找到libigraph.so.0'(找到你的系统上这个文件的位置。如果你做了make install,它可以去/ usr / local / lib ...还是在python lib目录下?)

  5. Find out if the directory where this file is in is missing from your current LD_LIBRARY_PATH ('echo $LD_LIBRARY_PATH').
  6. 找出当前LD_LIBRARY_PATH('echo $ LD_LIBRARY_PATH')中是否缺少此文件所在的目录。

  7. 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'
  8. 如果此目录不在此处,请添加它尝试'export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/ yourdirhere'(通过将其添加到/etc/ld.so.conf使其永久化)/'ldconfig -n / yourdirhere'

#2


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.

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

#3


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.

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

#4


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.

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