Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol not found Error #180

Closed
AndreaCooper0 opened this issue Oct 26, 2021 · 3 comments
Closed

Symbol not found Error #180

AndreaCooper0 opened this issue Oct 26, 2021 · 3 comments
Labels

Comments

@AndreaCooper0
Copy link

I encounter an error when writing the following scripts.

from torch_sparse import SparseTensor

The error is

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/andrea/opt/anaconda3/envs/research/lib/python3.8/site-packages/torch_sparse/__init__.py", line 14, in <module>
    torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
  File "/Users/andrea/opt/anaconda3/envs/research/lib/python3.8/site-packages/torch/_ops.py", line 104, in load_library
    ctypes.CDLL(path)
  File "/Users/andrea/opt/anaconda3/envs/research/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/andrea/opt/anaconda3/envs/research/lib/python3.8/site-packages/torch_sparse/_version_cpu.so, 6): Symbol not found: __ZN3c106detail23torchInternalAssertFailEPKcS2_jS2_S2_
  Referenced from: /Users/andrea/opt/anaconda3/envs/research/lib/python3.8/site-packages/torch_sparse/_version_cpu.so
  Expected in: /Users/andrea/opt/anaconda3/envs/research/lib/python3.8/site-packages/torch/lib/libc10.dylib
 in /Users/andrea/opt/anaconda3/envs/research/lib/python3.8/site-packages/torch_sparse/_version_cpu.so

How can I handle this? thx.

@tianyu-lu
Copy link

tianyu-lu commented Oct 26, 2021

I get a similar error with torch==1.10.0 but everything works with torch==1.9.0.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/tianyulu/.cache/pypoetry/virtualenvs/llama-TVWF6B3c-py3.9/lib64/python3.9/site-packages/torch_sparse/__init__.py", line 15, in <module>
    torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
  File "/home/tianyulu/.cache/pypoetry/virtualenvs/llama-TVWF6B3c-py3.9/lib64/python3.9/site-packages/torch/_ops.py", line 110, in load_library
    ctypes.CDLL(path)
  File "/usr/lib64/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/tianyulu/.cache/pypoetry/virtualenvs/llama-TVWF6B3c-py3.9/lib64/python3.9/site-packages/torch_sparse/_convert_cpu.so: undefined symbol: _ZNK2at6Tensor5zero_Ev

I installed torch-sparse from the wheel at this url:

https://data.pyg.org/whl/torch-1.9.0%2Bcpu/torch_sparse-0.6.12-cp39-cp39-linux_x86_64.whl

Note I'm using python 3.9

@rusty1s
Copy link
Owner

rusty1s commented Oct 27, 2021

Keep in mind that you need to install from https://data.pyg.org/whl/torch-1.10.0+cpu when using PyTorch 1.10.

@github-actions
Copy link

This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?

@github-actions github-actions bot added the stale label Apr 26, 2022
@rusty1s rusty1s closed this as completed Apr 26, 2022
yanbing-j pushed a commit to yanbing-j/pytorch_sparse that referenced this issue Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants