Hi,
I have installed the latest torch version in a fresh environment and get the following error when executing python run_glue.py:
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/user/.conda/envs/env/lib/python3.8/site-packages/torch/lib/libtorch_python.so)
How did you install PyTorch? Using the official install commands or from conda-forge? I’ve seen these GLIBC incompatibilities in coda-forge before as it seems some of the libs use the latest standards.
Could you post a minimal and executable code snippet to reproduce the issue or is it already failing during the import?
I’ve created a new and clean conda environment and cannot reproduce any issues:
I get this conda warning, when installing any conda package:
Collecting package metadata (current_repodata.json): WARNING conda.models.version:get_matcher(542): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.7.1.*, but conda is ignoring the .* and treating it as 1.7.1
done
The following packages will be UPDATED:
pytorch conda-forge::pytorch-2.1.0-cpu_generi~ --> pytorch::pytorch-2.1.1-py3.8_cuda11.8_cudnn8.7.0_0 None
The following packages will be SUPERSEDED by a higher-priority channel:
torchvision conda-forge::torchvision-0.16.1-cpu_p~ --> pytorch::torchvision-0.16.1-py38_cu118 None
The following packages will be DOWNGRADED:
_openmp_mutex 4.5-2_gnu --> 4.5-2_kmp_llvm None
libblas 3.9.0-21_linux64_openblas --> 3.9.0-16_linux64_mkl None
libcblas 3.9.0-21_linux64_openblas --> 3.9.0-16_linux64_mkl None
liblapack 3.9.0-21_linux64_openblas --> 3.9.0-16_linux64_mkl None
Great! So for some reason the conda-forge packages were indeed installed.
Note that we do not maintain them but I’ve seen similar compatibility issues in the past when trying to mix packages from conda-forge with other libs.
The environment variables CONDA_HOME, PATH and LD_LIBRARY_PATH all point to /usr/local/cuda-12.2 or the lib64 subdirectory, as does the logical link /usr/local/cuda. Furthermore, I was able to compile a trivial CUDA hello program, suggesting that the installation is good.
Thank you for catching this @ptrblck! In the end, the usual installs failed to handle CUDA Version 12.2, falling through to CPU type. After downgrading to CUDA Version 12.1 the GPU versions did install, and all is well.
This is specific to Conda environment, where it prefers all the apps to use libstdc++ from its environment, rather than a system one. Ugly hack I sometimes have to revert to is to delete it and symlink system libstdc++ there.
By the way, are you running into this issue when you are trying to use compile?