如何在 Ubuntu 8.04 LTS 64 位上安装 python-igraph?
显然,libigraph
和 python-igraph
是地球上唯一不能通过 apt-get
或 easy_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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你是怎么编译的? 您是否进行了 make install(如果有)。
至于 easy_install 版本中的“找不到库”错误,我会尝试以下操作:
sudo Updatedb
”(更新定位数据库)locate libigraph.so.0<” /code>'(查找此文件在系统上的位置。如果您进行了 make install,它可能会转到 /usr/local/lib ...或者它在 python lib 目录中吗?)
echo $LD_LIBRARY_PATH
”)。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:
sudo updatedb
' (to update the locate database)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?)echo $LD_LIBRARY_PATH
').export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/yourdirhere
' (make it permanent by adding it to /etc/ld.so.conf) / 'ldconfig -n /yourdirhere
'请注意,自 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.
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.
我按照 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.