lucasb-eyer / pydensecrf

Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't import the library

JiayunLi opened this issue · comments

Hi,

I am trying to install this library with pip install. The library seemed to be successfully installed. My cython is v 0.24.1. But when I tried to import pydensecrf.densecrf, I got .../pydensecrf/densecrf.so: undefined symbol: _ZTINSt8ios_base7failureB5cxx11E error.

I would really appreciate if anyone could help me with this?

At first, this seems to be a problem with your system to me. ios_base::failure is part of the standard c++ library, and it not finding the symbol hints to a linking problem.
Maybe you have multiple compiler/linker versions or libstdc++ versions installed and are mixing them up somehow? You can use ldd densecrf.so to see what exact files are being linked and found at runtime.
I'm afraid there's not much more I can help unless I can reproduce the error myself.

Thanks! I am able to solve the problem by installing libgcc in the anaconda virtual environment.

Awesome! If you would be so kind to give me the exact command you used to fix this, I could include it in the README and it might help others getting the same error.

Cool! I Google for similar problem, and found this one explosion/sense2vec#19 The solution they mentioned solved my problem.
To install libgcc, I used conda install libgcc

Thank you! I'll close this issue then.