pytorch_geometric: OSError: /lib64/libm.so.6: version `GLIBC_2.27' not found

๐Ÿ“š Installation

I have followed the instructions on the pytorch geometric website, and am repeatedly getting this error. The issues opened about this havenโ€™t been helpful either. I simply copy and paste the installation commands and get the error. Hereโ€™s what I do

pip3 install torch torchvision torchaudio

and

pip3 install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.10.0+cu102.html

and when I import torch-spline-conv, I get the following

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/gpfs/home/hzaki1/celltypefromgrn/env/lib/python3.7/site-packages/torch_spline_conv/__init__.py", line 15, in <module>
    torch.ops.load_library(spec.origin)
  File "/gpfs/home/hzaki1/celltypefromgrn/env/lib/python3.7/site-packages/torch/_ops.py", line 110, in load_library
    ctypes.CDLL(path)
  File "/gpfs/runtime/opt/python/3.7.4/lib/python3.7/ctypes/__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /gpfs/home/hzaki1/celltypefromgrn/env/lib/python3.7/site-packages/torch_spline_conv/_basis_cuda.so)

Environment

  • OS: Linux
  • Python version: 3.7
  • PyTorch version: 1.10.0
  • CUDA/cuDNN version: 10.2
  • GCC version: 10.2
  • How did you try to install PyTorch Geometric and its extensions (wheel, source): Via the wheel and guide on the website
  • Any other relevant information:

Checklist

  • 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

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 24 (6 by maintainers)

Most upvoted comments

version GLIBC_2.27' not found ->> it was also resolved by pip uninstall torch-spline-conv

For A100 cards lowering install versions was not compatible.

๐Ÿ“š Installation

I have followed the instructions on the pytorch geometric website, and am repeatedly getting this error. The issues opened about this havenโ€™t been helpful either. I simply copy and paste the installation commands and get the error. Hereโ€™s what I do

pip3 install torch torchvision torchaudio

and

pip3 install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.10.0+cu102.html

and when I import torch-spline-conv, I get the following

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/gpfs/home/hzaki1/celltypefromgrn/env/lib/python3.7/site-packages/torch_spline_conv/__init__.py", line 15, in <module>
    torch.ops.load_library(spec.origin)
  File "/gpfs/home/hzaki1/celltypefromgrn/env/lib/python3.7/site-packages/torch/_ops.py", line 110, in load_library
    ctypes.CDLL(path)
  File "/gpfs/runtime/opt/python/3.7.4/lib/python3.7/ctypes/__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /gpfs/home/hzaki1/celltypefromgrn/env/lib/python3.7/site-packages/torch_spline_conv/_basis_cuda.so)

Environment

  • OS: Linux
  • Python version: 3.7
  • PyTorch version: 1.10.0
  • CUDA/cuDNN version: 10.2
  • GCC version: 10.2
  • How did you try to install PyTorch Geometric and its extensions (wheel, source): Via the wheel and guide on the website
  • Any other relevant information:

Checklist

  • 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

Same error here!

Try

conda install pyg -c pyg -c conda-forge

for PyTorch 1.9 ๐Ÿ˜ƒ

I faced the same error, and indeed installing PyTorch 1.9.0 and then installing PyG with conda did the trick.

The GLIB_2.27 not found issue happens due to torch-spline-conv. Just uninstalling the dependency should fix this issue.

Thanks, solved the issue by uninstalling the torch-spline-conv.

version GLIBC_2.27' not found ->> it was also resolved by pip uninstall torch-spline-conv`

For A100 cards that lowering install versions was not compatible.

It works!!

Try

conda install pyg -c pyg -c conda-forge

for PyTorch 1.9 ๐Ÿ˜ƒ

Thank you for your instant reply! It works.

have same error. lower to torch_geometric=2.0.2 fix.

I followed these directions, and get the following:

>>> import torch_geometric
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/gpfs/home/hzaki1/celltypefromgrn/env/lib/python3.7/site-packages/torch_geometric/__init__.py", line 7, in <module>
    import torch_geometric.data
  File "/gpfs/home/hzaki1/celltypefromgrn/env/lib/python3.7/site-packages/torch_geometric/data/__init__.py", line 1, in <module>
    from .data import Data
  File "/gpfs/home/hzaki1/celltypefromgrn/env/lib/python3.7/site-packages/torch_geometric/data/data.py", line 3, in <module>
    from torch_geometric.typing import OptTensor, NodeType, EdgeType
  File "/gpfs/home/hzaki1/celltypefromgrn/env/lib/python3.7/site-packages/torch_geometric/typing.py", line 4, in <module>
    from torch_sparse import SparseTensor
  File "/gpfs/home/hzaki1/celltypefromgrn/env/lib/python3.7/site-packages/torch_sparse/__init__.py", line 16, in <module>
    f'{library}_{suffix}', [osp.dirname(__file__)]).origin)
AttributeError: 'NoneType' object has no attribute 'origin'

Any advice with this?