显然,libigraph
并且python-igraph
是无法通过安装在地球上唯一的包apt-get
或easy_install
Ubuntu下的8.04 64位.
从源代码安装源代码似乎顺利...直到我尝试使用它们.
当我运行python时,我得到:
>>> import igraph Traceback (most recent call last): File "", line 1, in File "igraph/__init__.py", line 30, in from igraph.core import * ImportError: No module named core
或者(如果我使用easy_install版本的python-igraph)
>>> import igraph Traceback (most recent call last): File "", line 1, in File "build/bdist.linux-x86_64/egg/igraph/__init__.py", line 30, in File "build/bdist.linux-x86_64/egg/igraph/core.py", line 7, in 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
任何人都能指出我正确的方向吗?
你是怎么编的?你做了make install(如果有的话)吗?
至于easy_install版本中的'找不到库'错误,我会尝试以下方法:
' sudo updatedb
'(更新定位数据库)
' locate libigraph.so.0
'(找到你的系统上这个文件的位置.如果你做了make install,它可能已经去了/ usr/local/lib ...还是在python lib目录下?)
找出当前LD_LIBRARY_PATH(' echo $LD_LIBRARY_PATH
')中是否缺少此文件所在的目录.
如果此目录不在此处,请添加try' export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/yourdirhere
'(通过将其添加到/etc/ld.so.conf使其永久化)/' ldconfig -n /yourdirhere
'