[martin@A08-R32-I196-2-FZ1RLP2 anaconda3]$ ipython
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import torch
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-eb42ca6e4af3> in <module>()
----> 1 import torch
~/anaconda3/lib/python3.6/site-packages/torch/__init__.py in <module>()
78 pass
79
---> 80 from torch._C import *
81
82 __all__ += [name for name in dir(_C)
ImportError: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/martin/anaconda3/lib/python3.6/site-packages/torch/lib/libcaffe2.so)
In [2]:
I just installed Pytorch using the command: conda install pytorch torchvision -c pytorch
OK, I see.
Iâm not sure, if it helps you and you might want to create another conda environment first, but you could try to copy the requested lib into your conda lib folder:
Sorry for bringing this topic to live again. I have a CentOS 7 system where the default libstdc++.so.6 is NOT providing the CXXABI_1.3.8. This I found out by executing âstrings libstdc++.so.6 | grep CXXABIâ at the prompt. However, I do have a conda environment, which is activated, that wants to access the CXXABI_1.3.8 and points to /usr/lib64/libstdc++.so.6 instead of its own /opt/anaconda3/envs/cuda10_base/lib/libstdc++.so.6 or the eqv. /opt/anaconda3/envs/cuda10_base/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6. These instances do indeed provide CXXABI_1.3.8 as they should.
Does this imply that links are broken in conda? Why is the conda environment not looking in the correct place? And what can I do about it without âdestroyingâ my sym-links in the CentOS-system? Also, it could explain the above users experience also.
Kind regards, Per v R
I ended up here looking for my problem, same error message but different app.
My app gave the error with /lib64/libstdc++.so.6 which was pointing to /lib64/libstdc++.so.6.0.19
After reading other webs, I kind of figured out I had to âreplaceâ to where my /lib64/libstdc++.so.6 was pointing out and a newer version was located in my conda environment⌠so:
Thanks. I figured this out myself in the end. However as you point out it is a bad solution. To make the solution a little better I did a script to switch back and forth with âln -sâ /symbolic links pointing towards the conda env when doing Pytorch and pointing towards the old lib when doing other stuff. This prevents OS âmeltdownâ because of deprecated functions. And as a bonus, CentOS 8 is âsoonâ ready!