如何在Ubuntu 8.04 LTS 64-bit上安装python-igraph?
-
08-07-2019 - |
题
显然 libigraph
和 python-igraph
是地球上唯一无法通过 apt-get
或安装的软件包在Ubuntu 8.04 LTS 64位下的easy_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
或(如果我使用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
我从这里抓起来源
igraph 0.5.2 = http://igraph.sourceforge.net/download.html
python-igraph 0.5.2 = http://pypi.python。组织/的PyPI /蟒-的igraph / 0.5.2
有人能指出我正确的方向吗?
解决方案
你是怎么编的?你做了make install(如果有的话)。
对于easy_install版本中的“找不到库”错误,我会尝试以下操作:
- '
sudo updatedb
'(更新定位数据库) - '
找到libigraph.so.0
'(查找此文件在您系统中的位置。如果您进行了make install,则可以转到/ usr / local / lib ...或者它是在python lib目录中吗?) - 查看当前LD_LIBRARY_PATH('
echo $ LD_LIBRARY_PATH
')中是否缺少此文件所在的目录。 - 如果此目录不在此处,请添加尝试'
export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/ yourdirhere
'(通过将其添加到/etc/ld.so.conf使其永久化)/'ldconfig -n / yourdirhere
'
醇>
其他提示
请注意,截至2009年11月8日,Launchpad提供官方Ubuntu软件包。请参阅相应的页面获取说明。与早期的Debian软件包存储库不同,它应该适用于32位和64位体系结构。
libigraph.so.0在哪里?它似乎不在python查找的位置,例如/ usr / lib,/ usr / local / lib等。
我按照 http://中的步骤进行操作socialsynergyweb.org/network/blog/install-python-igraph-ubuntu-904-64-bit 。另外要运行实际的igraph,我使用脚本python-igraph-0.5.2 / scripts / igraph。现在我可以使用igraph。如果我不使用scripts / igraph脚本,我会得到同样的错误。