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.

Issue importing torch_sparse

See original GitHub issue

I’m getting an error when importing torch_sparse. I have done a fresh installation of torch, with version 1.4.0. This is in order to get torch_geometric up to date. But I’m running into an error here:

>>> import torch_sparse
Traceback (most recent call last):
  File "/global/homes/d/danieltm/.local/cori/pytorchv1.4.0-gpu/lib/python3.7/site-packages/torch_sparse/__init__.py", line 14, in <module>
    library, [osp.dirname(__file__)]).origin)
  File "/global/homes/d/danieltm/.local/cori/pytorchv1.4.0-gpu/lib/python3.7/site-packages/torch/_ops.py", line 106, in load_library
    ctypes.CDLL(path)
  File "/usr/common/software/pytorch/v1.4.0-gpu/lib/python3.7/ctypes/__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /global/u2/d/danieltm/.local/cori/pytorchv1.4.0-gpu/lib/python3.7/site-packages/torch_sparse/_version.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/global/homes/d/danieltm/.local/cori/pytorchv1.4.0-gpu/lib/python3.7/site-packages/torch_sparse/__init__.py", line 22, in <module>
    raise OSError(e)
OSError: /global/u2/d/danieltm/.local/cori/pytorchv1.4.0-gpu/lib/python3.7/site-packages/torch_sparse/_version.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs

Do you know what this issue is related to?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
CindyTingcommented, Sep 19, 2020

Hello, @murnanedaniel. I am facing a similar error. May I ask, how did you find there is a local torch_sparse, and how did you remove the inconsistent one? I’m sorry I am a beginner, and not familiar with Linux. Thank you very much if you can answer me.

0reactions
rusty1scommented, Nov 8, 2020
pip install torch-sparse==latest+cu110

will install the binaries for CUDA 11.0, it will not install a CUDA toolkit. In case you have CUDA 10.2, I suggest to install PyTorch for CUDA 10.2 and torch-sparse==latest+cu102.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while importing torch_sparse · Issue #215 - GitHub
Ubuntu 16.04 Python: 3.8.13 Pytorch: 1.9.1.post3 cuda: 11.2 torch-sparse 0.6.13. The actual error message: >>> from torch_sparse import ...
Read more >
Importing torchsparse (PyTorch) on Windows 10 not working
It appears the package you are trying to import comes from this Github repo, which is different to the package you installed: torch-sparse...
Read more >
Installation — pytorch_geometric documentation
pip install pyg-lib torch-scatter torch-sparse -f ... *_cuda : You need to import torch first before importing any of the extension packages (see...
Read more >
paper.pdf - TorchSparse: Efficient Point Cloud Inference Engine
In this paper, we introduce TorchSparse, a high-performance ... import torchsparse.nn as spnn ... issues an FP16 memory request, the memory transaction.
Read more >
torch-sparse - PyPI
PyTorch Sparse. PyPI Version Testing Status Linting Status Code Coverage. This package consists of a small extension library of optimized sparse matrix ...
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