Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install python-igraph on Ubuntu 8.04 LTS 64-Bit?

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?

like image 444
Jacob Rigby Avatar asked Dec 13 '22 04:12

Jacob Rigby


1 Answers

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'
like image 124
ChristopheD Avatar answered Jan 09 '23 01:01

ChristopheD