ImportError : version `GLIBCXX_3.4.21' not found
etiennekintzler opened this issue · 1 comments
etiennekintzler commented
I have the following error when I try to import the package
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-c347d14ed904> in <module>
----> 1 import ctcdecode
~/.conda/envs/test_ctcdecode/lib/python3.8/site-packages/ctcdecode/__init__.py in <module>
1 import torch
2
----> 3 from ._ext import ctc_decode
4
5
ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /path/to/home/.conda/envs/test_ctcdecode/lib/python3.8/site-packages/ctcdecode/_ext/ctc_decode.cpython-38-x86_64-linux-gnu.so)
- Indeed looking into
CLIBCXX_3.4.21
is not present in/lib64/libstdc++.so.6
. However it is present in the path.conda/envs/test_ctcdecode/lib/libstdc++.so.6.0.29
- The error is still occur when I am not inside a conda environment.
- I try installing
libgcc
from conda as recommended in BVLC/caffe#4953 but it has not worked. - when I import the library
pyarrow
beforehand I am able to import the package. - I am on centos7 and I installed the package as instructed in the README.md
etiennekintzler commented
ok my bad, setting the env variable LD_LIBRARY_PATH
does solve the issue.
The problem is that I set it to the library file path instead of the directory path, i.e set it to /path/to/conda_env/envs/test_ctcdecode/lib/libstdc++.so.6
instead of /path/to/conda_env/envs/test_ctcdecode/lib/