rusty1s / pytorch_sparse

PyTorch Extension Library of Optimized Autograd Sparse Matrix Operations
MIT License
991 stars 145 forks source link

Issue with libc version #346

Open will-leeson opened 10 months ago

will-leeson commented 10 months ago

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

rusty1s commented 10 months ago

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).

HelloWorldLTY commented 5 months ago

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

yuehaowang commented 2 months ago

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.