3

I am trying to use the louvain python library after it was successfully installed. However, when I tried to load it, the interpreter says

>>> import louvain
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/user/anaconda/lib/python2.7/site-packages/louvain/__init__.py", line 108, in <module>
    from .functions import find_partition
  File "/Users/user/anaconda/lib/python2.7/site-packages/louvain/functions.py", line 2, in <module>
    from . import _c_louvain
ImportError: dlopen(/Users/user/anaconda/lib/python2.7/site-packages/louvain/_c_louvain.so, 2): Library not loaded: libxml2.2.dylib
  Referenced from: /Users/user/anaconda/lib/python2.7/site-packages/louvain/_c_louvain.so
  Reason: Incompatible library version: _c_louvain.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0

I have found a similar thread in this issue lxlm run time error. However, when I tied the proposed solution (i.e., force to install libxml2) conda install -f libxml2 it install it but I cannot load the louvain library. Basically, it generates the same error. I have the Python 2.7.10 |Anaconda 2.1.0 (x86_64)| (default, Sep 15 2015, 14:29:08) version. Do you have any suggestion? Thanks in advance.

Community
  • 1
  • 1
Paul
  • 165
  • 1
  • 1
  • 13

0 Answers0