Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found #113

Open
timotheecour opened this issue Dec 5, 2023 · 0 comments

Comments

@timotheecour
Copy link

timotheecour commented Dec 5, 2023

reduced from a more complex example:

conda create -n tmp2 python=3.10
conda activate tmp2
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install youtokentome

then:

python -c 'import youtokentome; import torch'
works

python -c 'import torch; import youtokentome'

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/timothee/.conda/envs/tmp1/lib/python3.10/site-packages/youtokentome/__init__.py", line 1, in <module>
    from .youtokentome import BPE
  File "/home/timothee/.conda/envs/tmp1/lib/python3.10/site-packages/youtokentome/youtokentome.py", line 4, in <module>
    import _youtokentome_cython
ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/timothee/.conda/envs/tmp1/lib/python3.10/site-packages/_youtokentome_cython.cpython-310-x86_64-linux-gnu.so)

environment note:

grep -E '^(VERSION|NAME)=' /etc/os-release
NAME="Oracle Linux Server"
VERSION="7.9"

workaround 1

import torch before import youtokentome or to add:

workaround 2

as mentioned in BVLC/caffe#4953 (comment)

conda install libgcc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.conda/envs/tmp1/lib

neither workaround is great and shouldn't be needed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant