pytorch_geometric icon indicating copy to clipboard operation
pytorch_geometric copied to clipboard

OSError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /home/user/anaconda3/envs/hbk_gcn/lib/python3.9/site-packages/torch_spline_conv/_basis_cuda.so)

Open kkwd22 opened this issue 3 years ago • 19 comments

📚 Installation

Environment

  • OS:ubuntu 16.04
  • Python version:3.9
  • PyTorch version:1.10
  • CUDA/cuDNN version:10.2
  • GCC version:
  • How did you try to install PyTorch Geometric and its extensions (wheel, source):
  • Any other relevant information:

Checklist

  • [x] I followed the installation guide.
  • [ ] I cannot find my error message in the FAQ.
  • [ ] I set up CUDA correctly and can compile CUDA code via nvcc.
  • [ ] I do have multiple CUDA versions on my machine.

Additional context

kkwd22 avatar Nov 11 '21 07:11 kkwd22

How did you try to install the extension packages and what's your GCC version?

rusty1s avatar Nov 12 '21 09:11 rusty1s

same error

  • OS : ubuntu 16.04
  • python : 3.8/3.9, try them both
  • pytorch: 1.10.0
  • CUDA 10.2
  • GCC version 7.5.0
  • PyG isntall : using "conda install pyg -c pyg -c conda-forge" import torch_geometric successfully, but when I try to import torch_geometric.nn, this error occurred

hcw0098 avatar Nov 13 '21 15:11 hcw0098

Does that help? https://github.com/NVIDIA/TensorRT/issues/1124

rusty1s avatar Nov 15 '21 07:11 rusty1s

I solved it by degrading torch to 1.9.0, dont know if it helps

hcw0098 avatar Nov 16 '21 08:11 hcw0098

I meet the same problem when using Pytorch 1.10 and pyg with cuda 11.3. I install with the following commands: conda create -n pasp_gnn pytorch torchvision torchaudio cudatoolkit=11.3 python=3 -c pytorch -c conda-forge -y conda activate pasp_gnn conda install pyg -c pyg -c conda-forge -y when I run from torch_geometric.nn.models.dimenet import SphericalBasisLayer, it gives the same error: OSError: /lib64/libm.so.6: version GLIBC_2.27' not found (required by .../lib/python3.9/site-packages/torch_spline_conv/_basis_cuda.so)`

But it will not happen if I install with Pytorch 1.9 Maybe a conflict problems between Pytorch 1.10 and torch_spline_conv?

Huni-ML avatar Nov 26 '21 05:11 Huni-ML

What's your GLIBC version?

ldd --version

rusty1s avatar Nov 26 '21 09:11 rusty1s

ldd --version

ldd (GNU libc) 2.17

Huni-ML avatar Nov 26 '21 10:11 Huni-ML

I think the main problem is that our wheels are compiled with Ubuntu 18.04 which comes with GLIBC 2.27 by default. Any chance you can upgrade to a higher version? Otherwise, you may need to install the extensions via manual compiling:

pip install torch-spline-conv

rusty1s avatar Nov 29 '21 06:11 rusty1s

I think the main problem is that our wheels are compiled with Ubuntu 18.04 which comes with GLIBC 2.27 by default. Any chance you can upgrade to a higher version? Otherwise, you may need to install the extensions via manual compiling:

pip install torch-spline-conv

Manual compiling pass. Thank you!

Huni-ML avatar Dec 06 '21 03:12 Huni-ML

@rusty1s - Since the wheels for torch-spline-conv links against GLIBC, and some systems have older versions of GLIBC installed, would it be possible to have torch-spline-conv (pyg conda version) link against a conda glib package (e.g., from the anaconda channel or conda-forge channel)? That way, versions would be managed within conda instead of relying on the native GLIBC installation which sometimes cannot be updated for various reasons.

chrisyeh96 avatar Feb 10 '22 23:02 chrisyeh96

Yes, I think this is possible. Am I correct to assume that all we need to do is install glib via conda prior to building the package here?

rusty1s avatar Feb 11 '22 08:02 rusty1s

Yes, I think this is possible. Am I correct to assume that all we need to do is install glib via conda prior to building the package here?

I wish I could help, but unfortunately I know very little about GitHub Actions and building packages. My original idea was that you could specify glib as a conda dependency of pyg.

chrisyeh96 avatar Feb 11 '22 08:02 chrisyeh96

I am running into this issue and have been unable to resolve it by running conda install -c conda-forge glib before installing pytorch-spline-conv. Does anyone have suggestions for other solutions? Thanks!

hnisonoff avatar Mar 03 '22 23:03 hnisonoff

For now, the only workaround is to install an older version of torch-spline-conv or avoid to install it in the first place (it's an optional dependency of PyG).

rusty1s avatar Mar 04 '22 21:03 rusty1s

I come across the same problems

yuchenlichuck avatar Apr 17 '22 10:04 yuchenlichuck

I think the main problem is that our wheels are compiled with Ubuntu 18.04 which comes with GLIBC 2.27 by default. Any chance you can upgrade to a higher version? Otherwise, you may need to install the extensions via manual compiling:

pip install torch-spline-conv

How to install the extension via manual compiling?

ljw-struggle avatar Jun 05 '22 05:06 ljw-struggle

pip install without the -f option will result in a manual compilation. It is similar to doing

git clone https://github.com/rusty1s/pytorch_spline_conv
cd pytorch_spline_conv
python setup.py install

rusty1s avatar Jun 06 '22 07:06 rusty1s

When I manually compiled torch-spline-conv:

r: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string, std::shared_ptrtorch::nn::Module >’ to type ‘torch::OrderedDict<std::basic_string, std::shared_ptrtorch::nn::Module >&’ error: command '/usr/local/cuda-11.3/bin/nvcc' failed with exit code 1

almumujin avatar Aug 31 '22 08:08 almumujin

same error

OS : ubuntu 16.04 python : 3.9 pytorch: 1.10.2 CUDA 10.2 GCC version 5.4.0 PyG isntall : using "conda install pyg=2.0.4 -c pyg -c conda-forge" import torch_geometric successfully, but when I try to import torch_geometric.nn as pygnn, this error occurred

I solved this by "pin uninstall torch-spline-conv" and "pip install torch-spline-conv -f https://data.pyg.org/whl/torch-${TORCH}+${CUDA}.html"

fengenxiang1123 avatar Sep 14 '22 01:09 fengenxiang1123