question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

importerror occurs when importing Data from torch_geometric.data

See original GitHub issue

Environment 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:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Apr 18, 2019

Mh, GCC version seems fine to me. My guess is that your anaconda might be messed up. Do you work with different Python versions? I would recommend starting from a clean one.

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!!!

0reactions
rusty1scommented, Apr 18, 2019

In addition, it would be helpful if you could report the installation log of torch-scatter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

importerror occurs when importing Data from torch_geometric ...
Environment 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 ...
Read more >
Importing pytorch geometric results in an error message
I've added a screenshot of the packages in my conda environment and the error message that I get when I try to import...
Read more >
Source code for torch_geometric.data.lightning_datamodule
... import Data, HeteroData, Dataset from torch_geometric.loader.dataloader ... as PLLightningDataModule no_pytorch_lightning = False except (ImportError, ...
Read more >
Graphein Protein Structure Dataloaders
ProteinGraphListDataset is a lightweight alternative for creating a dataset ... 19 try: ---> 20 from torch_geometric.data import Data 21 except ImportError: ...
Read more >
DLL load failed: The specified procedure could not be found
Pytorch-geometric library ImportError: DLL load failed: The specified ... debug, set_debug 5 import torch_geometric.data ----> 6 import ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found