pytorch_scatter: torch_sparse/_convert_cpu.so: undefined symbol: _ZNK2at6Tensor5zero_Ev

code: In [1]: import torch In [2]: from torch_geometric.data import Data

error:

OSError Traceback (most recent call last) <ipython-input-2-b336892afbe1> in <module>() ----> 1 from torch_geometric.data import Data

~/anaconda3/lib/python3.7/site-packages/torch_geometric/init.py in <module>() 5 from .debug import is_debug_enabled, debug, set_debug 6 ----> 7 import torch_geometric.data 8 import torch_geometric.loader 9 import torch_geometric.transforms

~/anaconda3/lib/python3.7/site-packages/torch_geometric/data/init.py in <module>() ----> 1 from .data import Data 2 from .hetero_data import HeteroData 3 from .temporal import TemporalData 4 from .batch import Batch 5 from .dataset import Dataset

~/anaconda3/lib/python3.7/site-packages/torch_geometric/data/data.py in <module>() 1 from typing import (Optional, Dict, Any, Union, List, Iterable, Tuple, 2 NamedTuple, Callable) ----> 3 from torch_geometric.typing import OptTensor, NodeType, EdgeType 4 from torch_geometric.deprecation import deprecated 5

~/anaconda3/lib/python3.7/site-packages/torch_geometric/typing.py in <module>() 2 3 from torch import Tensor ----> 4 from torch_sparse import SparseTensor 5 6 # Types for accessing data ####################################################

~/anaconda3/lib/python3.7/site-packages/torch_sparse/init.py in <module>() 14 ]: 15 torch.ops.load_library(importlib.machinery.PathFinder().find_spec( —> 16 f’{library}_{suffix}', [osp.dirname(file)]).origin) 17 18 if torch.cuda.is_available(): # pragma: no cover

~/anaconda3/lib/python3.7/site-packages/torch/_ops.py in load_library(self, path) 108 # static (global) initialization code in order to register custom 109 # operators with the JIT. –> 110 ctypes.CDLL(path) 111 self.loaded_libraries.add(path) 112

~/anaconda3/lib/python3.7/ctypes/init.py in init(self, name, mode, handle, use_errno, use_last_error) 354 355 if handle is None: –> 356 self._handle = _dlopen(self._name, mode) 357 else: 358 self._handle = handle

OSError: /root/anaconda3/lib/python3.7/site-packages/torch_sparse/_convert_cpu.so: undefined symbol: _ZNK2at6Tensor5zero_Ev

I followed the Quick Start installation, with torch=1.10.0+cu102

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

This is related to a potentially false intallation of torch-sparse. Can you show me the installation log when running:

pip uninstall torch-sparse
pip uninstall torch-sparse
pip install torch-sparse -f https://data.pyg.org/whl/torch-1.10.0+cu102.html

You also need to uninstall and update torch-scatter, similarly to how you did it with torch-sparse.

There is the same issue when running the Colab Notebooks tutorials.