pytorch_scatter icon indicating copy to clipboard operation
pytorch_scatter copied to clipboard

Undefined symbol error with `torch==2.5.1`

Open dhpitt opened this issue 1 year ago • 5 comments

I'm getting an error on Ubuntu when installing torch_scatter via conda install pytorch-scatter -c pyg. No error at install time, but when I import torch_scatter, it seems like it's compiled for the wrong torch version:

Python 3.10.14 (main, Mar 21 2024, 16:24:04) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'2.5.1+cu124'
>>> import torch_scatter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dave/miniconda3/envs/ENV/lib/python3.10/site-packages/torch_scatter/__init__.py", line 16, in <module>
    torch.ops.load_library(spec.origin)
  File "/home/dave/miniconda3/envs/ENV/lib/python3.10/site-packages/torch/_ops.py", line 1350, in load_library
    ctypes.CDLL(path)
  File "/home/dave/miniconda3/envs/ENV/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/dave/miniconda3/envs/ENV/lib/python3.10/site-packages/torch_scatter/_version_cuda.so: undefined symbol: _ZN3c1017RegisterOperatorsD1Ev
>>> ```

dhpitt avatar Jan 27 '25 21:01 dhpitt

same question

lziiid avatar Feb 16 '25 04:02 lziiid

  • 1

vbtcl avatar Feb 24 '25 04:02 vbtcl

Maybe try building from source?

It works well with torch 251 on Archlinux

Image

lancercat avatar Feb 28 '25 10:02 lancercat

and 1

zhiqiangzhongddu avatar Jul 01 '25 16:07 zhiqiangzhongddu

I tried building from the source on ubuntu torch=2.5.1+cu121. It still fails.

Ahmad-Jarrar avatar Jul 14 '25 18:07 Ahmad-Jarrar