importerror occurs when importing Data from torch_geometric.data
See original GitHub issueEnvironment OS: Linux 16.04 Python version: 3.5 PyTorch version: 1.0.1 CUDA/cuDNN version: 9.0 / 7.3.1 GCC version: 5.4.0
imimporterror occurs when importing Data from torch_geometric.data
ImportError Traceback (most recent call last) <ipython-input-1-7a40c8996590> in <module>() 2 import torch.nn as nn 3 import torch ----> 4 from torch_geometric.data import Data
/home/miracle/anaconda3/lib/python3.5/site-packages/torch_geometric/data/init.py in <module>() ----> 1 from .data import Data 2 from .batch import Batch 3 from .dataset import Dataset 4 from .in_memory_dataset import InMemoryDataset 5 from .dataloader import DataLoader, DataListLoader, DenseDataLoader
/home/miracle/anaconda3/lib/python3.5/site-packages/torch_geometric/data/data.py in <module>() 2 3 import torch ----> 4 from torch_geometric.utils import (contains_isolated_nodes, 5 contains_self_loops, is_undirected) 6
/home/miracle/anaconda3/lib/python3.5/site-packages/torch_geometric/utils/init.py in <module>() 1 from .degree import degree ----> 2 from .scatter import scatter_ 3 from .softmax import softmax 4 from .undirected import is_undirected, to_undirected 5 from .loop import contains_self_loops, remove_self_loops, add_self_loops
/home/miracle/anaconda3/lib/python3.5/site-packages/torch_geometric/utils/scatter.py in <module>()
----> 1 import torch_scatter
2
3
4 def scatter_(name, src, index, dim_size=None):
5 r"""Aggregates all values from the :attr:src
tensor at the indices
/home/miracle/anaconda3/lib/python3.5/site-packages/torch_scatter/init.py in <module>() 1 from .add import scatter_add 2 from .sub import scatter_sub ----> 3 from .mul import scatter_mul 4 from .div import scatter_div 5 from .mean import scatter_mean
/home/miracle/anaconda3/lib/python3.5/site-packages/torch_scatter/mul.py in <module>() 1 from torch.autograd import Function 2 ----> 3 from torch_scatter.utils.ext import get_func 4 from torch_scatter.utils.gen import gen 5
/home/miracle/anaconda3/lib/python3.5/site-packages/torch_scatter/utils/ext.py in <module>() 1 import torch ----> 2 import torch_scatter.scatter_cpu 3 4 if torch.cuda.is_available(): 5 import torch_scatter.scatter_cuda
ImportError: /home/miracle/anaconda3/lib/python3.5/site-packages/torch_scatter/scatter_cpu.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZNSt13runtime_errorC2EPKc
i’m not sure if it’s relevant to gcc version. Please help me.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
i just reinstalled the anaconda and upgrade the python version to 3.6, the problem is solved! Thank you very much for your adivce and patience!!!
In addition, it would be helpful if you could report the installation log of
torch-scatter
.