|
From: | Tamas Nepusz |
Subject: | Re: [igraph] Igraph python install problem |
Date: | Tue, 2 Sep 2008 11:53:48 +0100 |
Hi,
It seemed to install OK, but when I try and import igraph or run the test.py script I get:This is because although gcc was able to find the igraph library during the linking phase (when it created the actual .so files for the Python extension), it is not able to find that anymore when you try to import it. The reason is that you installed the igraph library (libigraph.so.*) in your home directory somewhere and not in one of the default system library paths (/lib, /usr/lib, /usr/local/lib). The solution is to explicitly extend the library path to include the directory where you put igraph. E.g., if you put it in /home/dan/my- stuff/lib, then you should do the following:Traceback (most recent call last): File "..../python/python-igraph-0.5.1/test.py", line 11, in <module> import igraph.testFile "build/lib.linux-x86_64-2.5/igraph/__init__.py", line 30, in <module> ImportError: /bmm/home/dc101/python/lib/python2.5/site-packages/ igraph/core.so: undefined symbol: igraph_vector_destroy
export LD_LIBRARY_PATH=/home/dan/my-stuff/lib python >>> import igraphI think the system's library path can also be extended permanently by adjusting something in one of the config files in /etc and then calling ldconfig to reload the library caches, but I'm not sure.
Anyway, if you have a Debian system, you might find it easier to install igraph from our package repository (see the Download page on the homepage for instructions). Fedora packages are also available.
-- T.
[Prev in Thread] | Current Thread | [Next in Thread] |