Open 0225yyyyyqq opened 7 months ago
Hi. It seems torch_sparse is not correctly installed. The installation of PyG is tricky, please refer the package version in https://github.com/zhoux85/STAligner/blob/master/requirement.txt
You can run the following code to test if torch and pyg are correctly installed:
import torch
from torch_geometric.data import Data
from torch_scatter import scatter_max
from torch_sparse import transpose
from torch_cluster import graclus_cluster
Hope this helps.
Traceback (most recent call last): File "T.py", line 5, in
import STAligner
File "/home/ya/STAligner/STAligner/init.py", line 13, in
from .train_STAligner import train_STAligner, train_STAligner_subgraph
File "/home/ya/STAligner/STAligner/train_STAligner.py", line 7, in
from .STALIGNER import STAligner
File "/home/ya/STAligner/STAligner/STALIGNER.py", line 9, in
from .gat_conv import GATConv
File "/home/ya/STAligner/STAligner/gat_conv.py", line 2, in
from torch_geometric.typing import (OptPairTensor, Adj, Size, NoneType,
File "/home/ya/anaconda3/envs/env_STAligner/lib/python3.8/site-packages/torch_geometric/init.py", line 4, in
import torch_geometric.data
File "/home/ya/anaconda3/envs/env_STAligner/lib/python3.8/site-packages/torch_geometric/data/init.py", line 1, in
from .data import Data
File "/home/ya/anaconda3/envs/env_STAligner/lib/python3.8/site-packages/torch_geometric/data/data.py", line 3, in
from torch_geometric.typing import OptTensor, NodeType, EdgeType
File "/home/ya/anaconda3/envs/env_STAligner/lib/python3.8/site-packages/torch_geometric/typing.py", line 4, in
from torch_sparse import SparseTensor
File "/home/ya/anaconda3/envs/env_STAligner/lib/python3.8/site-packages/torch_sparse/init.py", line 15, in
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
File "/home/ya/anaconda3/envs/env_STAligner/lib/python3.8/site-packages/torch/_ops.py", line 852, in load_library
ctypes.CDLL(path)
File "/home/ya/anaconda3/envs/env_STAligner/lib/python3.8/ctypes/init.py", line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/ya/anaconda3/envs/env_STAligner/lib/python3.8/site-packages/torch_sparse/_version_cpu.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs
When I finished configuring the environment and tried to run it, an error like this appeared. It bothered me for a long time. I hope I can get your help. Thank you very much!