pytorch_sparse icon indicating copy to clipboard operation
pytorch_sparse copied to clipboard

/libm.so.6: version `GLIBC_2.29' not found

Open ChenS676 opened this issue 1 year ago • 5 comments

after install $ python -c "import torch; print(torch.version)" 2.3.1 $ python -c "import torch; print(torch.version.cuda)" 11.8 (EAsF) [cc7738@haicn1701 cc7738-TAGBench]$ python -c "import torch; print(torch.cuda.is_available())" True module load devel/cuda/11.8 pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.3.1+cu118.html pip install torch_geometric

I have an repeated error "/anaconda3/envs/EAsF/lib/python3.10/site-packages/torch_geometric/typing.py:54: UserWarning: An issue occurred while importing 'pyg-lib'. Disabling its usage. Stacktrace: /lib64/libm.so.6: version GLIBC_2.29' not found (required by /anaconda3/envs/EAsF/lib/python3.10/site-packages/libpyg.so) warnings.warn(f"An issue occurred while importing 'pyg-lib'. " /anaconda3/envs/EAsF/lib/python3.10/site-packages/torch_geometric/typing.py:110: UserWarning: An issue occurred while importing 'torch-sparse'. Disabling its usage. Stacktrace: /lib64/libm.so.6: version GLIBC_2.29' not found (required by /hkfs/home/haicore/aifb/cc7738/anaconda3/envs/EAsF/lib/python3.10/site-packages/libpyg.so) warnings.warn(f"An issue occurred while importing 'torch-sparse'. ""

ofc this error happends in slurm system, but i am wondering could you provide one immediate solution based on your experience, older version based on devel/cuda/11.4 is deprecated.

Best, C

ChenS676 avatar Jun 11 '24 10:06 ChenS676

I have the same issue, also on a SLURM system, but with:

  • torch 2.2.2+cu121
  • python 3.12
  • pyg_lib 0.4.0+pt22cu121
  • torch_cluster 1.6.3+pt22cu121
  • torch_scatter 2.1.2+pt22cu121
  • torch_sparse 0.6.18+pt22cu121
  • torch_spline_conv 1.2.2+pt22cu121

The same behaviour was observed when using the corresponding torch+cpu versions for pyg_lib, torch_cluster, torch_scatter, torch_sparse, torch_spline_conv.

JonasDeSchouwer avatar Jun 17 '24 13:06 JonasDeSchouwer

Looking into this.

rusty1s avatar Jun 18 '24 05:06 rusty1s

@rusty1s the following could save you some time.

After some further digging I did yesterday, the conclusion was as follows:

The installation of GLIBC (i.e. the GNU implementation of the C standard library) on our department's HPC cluster is outdated. The installed version is 2.28, while the version required by torch_sparse is >=2.29 and the latest stable release is 2.39.

There is not really a way to upgrade GLIBC without also upgrading the OS (in my case: CentOS 8.1), as substantial parts of the OS depend on it. I flagged the issue to the managers of our cluster but I don't have the permissions to upgrade the OS myself.

The steps I will take now are:

  1. See whether downgrading the libraries requiring GLIBC>2.29 solves the issue.
  2. If not, build those libraries from source.

JonasDeSchouwer avatar Jun 18 '24 07:06 JonasDeSchouwer

Update: downgrading to the following versions solved the issue for me

  • python 3.10
    
  • torch 2.1.0+cu121
    
  • pyg_lib 0.3.1+pt21cu121
    
  • torch_cluster 1.6.3+pt21cu121
    
  • torch_scatter 2.1.2+pt21cu121
    
  • torch_sparse 0.6.18+pt21cu121
    
  • torch_spline_conv 1.2.2+pt21cu121
    

Note that only the versions of torch and pyg_lib changed w.r.t. my previous comment. For all other libraries, it's only the build that changed from +pt22cu121 to +pt21cu121. I don't know if the change of the pyg_lib version was even necessary.

JonasDeSchouwer avatar Jun 18 '24 09:06 JonasDeSchouwer

Hi, thanks for your great help! Regarding how to install specific version of required packages, please use (torch_spline_conv as an example):

pip install torch_spline_conv==1.2.2+pt21cu121 -f https://data.pyg.org/whl/torch-2.1.0+cu121.html

HelloWorldLTY avatar Aug 31 '24 15:08 HelloWorldLTY

This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?

github-actions[bot] avatar Feb 28 '25 01:02 github-actions[bot]

Found this useful when having to install these requirement in an "old" HPC system with GLIBC_2.28, you can check which version this is via ldd --version. The trick - in my case - was to downgrade pyg_lib:

pip install pyg_lib==0.3.1 -f https://data.pyg.org/whl/torch-2.0.0+cu117.html

the latest version 0.4.0 was compiled with > GLIBC_2.29 compatibility.

luisaforozco avatar Apr 21 '25 15:04 luisaforozco