githubharald / CTCWordBeamSearch

Connectionist Temporal Classification (CTC) decoder with dictionary and language model.
https://towardsdatascience.com/b051d28f3d2e
MIT License
557 stars 160 forks source link

ImportError : undefined symbol: _ZNSt15__ #68

Closed allianceai closed 1 year ago

allianceai commented 1 year ago

I'm excited to start working with CTCWordBeamSearch, but I encountered this error while running the pytest after installing it. Any insight on the below error would be greatly appreciated! python: 3.9.7 tensorflow: 2.11.0 cuda 11.5

_``` __ ERROR collecting tests/test_word_beam_search.py ____ ImportError while importing test module '/home/cameron/CTCWordBeamSearch/tests/test_word_beam_search.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: ../../anaconda3/lib/python3.9/importlib/init.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) test_word_beam_search.py:4: in from word_beam_search import WordBeamSearch E ImportError: /home/cameron/anaconda3/lib/python3.9/site-packages/word_beam_search.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr10_M_releaseEv

githubharald commented 1 year ago

Hi, seems to be some mismatch between anaconda C++ libs and the ones compiled with word beam search.

Quickly googling shows entries like these:

However, I'm currently not sure how to fix this as I'm not using anaconda (but classic venv + pip). Is there any chance you could try without anaconda, e.g. using the default Python installation and then trying to import word beam search?