1

I am trying to import igraph.Graph from the python-igraph(0.7.1.post6) package using python 3.5.0 on Ubuntu 16.04.1 LT but get an error:

from igraph._igraph import *

ImportError: /home/ubuntu/djangoproject/env/lib/python3.5/site-packages/igraph/_igraph.cpython-35m-x86_64-linux-gnu.so: undefined symbol: xmlStrEqual

My understanding is that the package requires xmlStrEqual from libxml2, but that no binding has been made. Libxml2 is installed on my system. Running $apt-get install libxml2 gives:

libxml2 is already the newest version (2.9.3+dfsg1-1ubuntu0.1).

I am using a virtualenv with the following setup like so:

virtualenv -p python3 env
source env/bin/activate
pip install python-igraph==0.7.1.post6

Running $ ldd /home/ubuntu/djangoproject/env/lib/python3.5/site-packages/igraph/_igraph*.so gives:

linux-vdso.so.1 =>  (0x00007ffdd33b8000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7ce24c5000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7ce2143000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7ce1f2c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7ce1d0f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7ce1946000)
/lib64/ld-linux-x86-64.so.2 (0x000055e56299f000)

I would expect a binding such as libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 also.

Does anyone know why this isn't happening or a solution to this problem?

Silian Rails
  • 897
  • 1
  • 8
  • 14

1 Answers1

0

The problem was that there was another copy of libxml2 installed on the system in /usr/local/lib, and this was somehow unsuitable for dynamic linking. Removing the extra copy of libxml2 fixed the problem.

Here is a fuller account of the issue.

Silian Rails
  • 897
  • 1
  • 8
  • 14
  • Hello, I have the same issue, could you please explain how to find and remove this 'unlinkable' libraby? – skkap Feb 01 '17 at 08:57