pytorch_geometric: can't run with this error: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs

😵 Installation

Hi!

I installed the PyG according to the documentation(https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html). tried to run some sample code to test if I installed successfully, then I encountered this issue.

Traceback (most recent call last): File “test_dataloader.py”, line 54, in <module> from torch_geometric.data import Data File “/usr/local/lib/python3.8/dist-packages/torch_geometric/init.py”, line 4, in <module> import torch_geometric.data File “/usr/local/lib/python3.8/dist-packages/torch_geometric/data/init.py”, line 1, in <module> from .data import Data File “/usr/local/lib/python3.8/dist-packages/torch_geometric/data/data.py”, line 3, in <module> from torch_geometric.typing import OptTensor, NodeType, EdgeType File “/usr/local/lib/python3.8/dist-packages/torch_geometric/typing.py”, line 4, in <module> from torch_sparse import SparseTensor File “/usr/local/lib/python3.8/dist-packages/torch_sparse/init.py”, line 15, in <module> torch.ops.load_library(importlib.machinery.PathFinder().find_spec( File “/usr/lib/python3/dist-packages/torch/_ops.py”, line 104, in load_library ctypes.CDLL(path) File “/usr/lib/python3.8/ctypes/init.py”, line 373, in init self._handle = _dlopen(self._name, mode)

OSError: /usr/local/lib/python3.8/dist-packages/torch_sparse/_version_cuda.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs

I tried to search previous issues, there is someplace mentioned about that system cuda and PyTorch cuda mismatch. I check mine, they both at 11.1, so I think it may not be the root cause of my issue.

Can anyone help me with this? Is there any other possibility? I have been stuck here for 4 days and have no clue about next move. Thank you so much for any advice!

Environment

  • PyG version (torch_geometric.__version__): 2.0.3
  • PyTorch version: (torch.__version__): 1.9
  • OS (e.g., Linux): Linux
  • Python version (e.g., 3.9): 3.8
  • CUDA/cuDNN version: cuda 11.1 (nvcc version also 11.1)
  • How you installed PyTorch and PyG (conda, pip, source): pip
  • Any other relevant information (e.g., version of torch-scatter):

Additional context

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 19 (9 by maintainers)

Most upvoted comments

Thanks for confirming. I hope you are good to go now.

@rusty1s I followed version corresbondences on [https://pytorch-geometric.com/whl/], thus torch-1.6.0 and torch-scatter-2.0.5 should match. And your doubt about the 1.6 version of Pytorch is correct to some extent, cause that error does not occur when I use 1.4 . (chose 1.4 because my cuda version is 10.0, kind of old.) I will try Pytorch 1.10 as you suggested for testing and give an update later. Thank you.