pytorch_sparse icon indicating copy to clipboard operation
pytorch_sparse copied to clipboard

Issue with libc version

Open will-leeson opened this issue 2 years ago • 3 comments

I have recently reinstalled pytorch_geometric and pytorch_sparse. After installing version 2.4.0, I get the following warning when I import pytorch_geometric

/path/to/.conda/envs/gnn/lib/python3.10/site-packages/torch_geometric/typing.py:101: UserWarning: An issue occurred while importing 'torch-sparse'. Disabling its usage. Stacktrace: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /path/to/.conda/envs/gnn/lib/python3.10/site-packages/torch_sparse/_metis_cuda.so)
  warnings.warn(f"An issue occurred while importing 'torch-sparse'. "

Previously, I had been using pytorch_geometric version 2.3.1 and I did not get this warning. Unfortunately, I am not able to install glibc 2.29 as these are on CentOS servers which I don't have privileges on. Is there a possible workaround? The version of glibc on the machines is 2.17

will-leeson avatar Oct 23 '23 18:10 will-leeson

The current workaround would be to either (1) install an earlier version of torch-sparse and stay on an earlier PyTorch version, or (2) install torch-sparse from source (this may take a while).

rusty1s avatar Oct 24 '23 18:10 rusty1s

Hi, (2) works for me. Thanks a lot.

HelloWorldLTY avatar Apr 03 '24 05:04 HelloWorldLTY

If you are installing torch_geometric via pip, perhaps try conda instead: conda install pyg -c pyg. I had the same problem with pip but no such issues with conda.

yuehaowang avatar Jun 19 '24 10:06 yuehaowang