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

An issue occurred while importing 'torch-scatter'. #430

Open
BlacMountain opened this issue Mar 22, 2024 · 5 comments
Open

An issue occurred while importing 'torch-scatter'. #430

BlacMountain opened this issue Mar 22, 2024 · 5 comments

Comments

@BlacMountain
Copy link

No description provided.

@BlacMountain BlacMountain changed the title There are a i An issue occurred while importing 'torch-scatter'. Mar 22, 2024
@BlacMountain BlacMountain reopened this Mar 22, 2024
@BlacMountain
Copy link
Author

BlacMountain commented Mar 22, 2024

UserWarning: An issue occurred while importing 'torch-scatter'. Disabling its usage. Stacktrace: dlopen(/Users/PycharmProjects/venv/lib/python3.9/site-packages/torch_scatter/_version_cpu.so, 0x0006): Symbol not found: __ZN3c1017RegisterOperatorsD1Ev
Referenced from: /Users/PycharmProjects/venv/lib/python3.9/site-packages/torch_scatter/_version_cpu.so
Expected in: /Users/PycharmProjects/venv/lib/python3.9/site-packages/torch/lib/libtorch_cpu.dylib

@BlacMountain
Copy link
Author

Traceback (most recent call last):
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Users/PycharmProjects/models_micro.py", line 7, in
from utils import pairwise_cosine_sim, to_dense_batch, sinkhorn, rank3_diag, spectral_loss
File "/Users/PycharmProjects/utils.py", line 15, in
from torch_scatter import scatter_add
File "/Users/PycharmProjects/venv/lib/python3.9/site-packages/torch_scatter/init.py", line 16, in
torch.ops.load_library(spec.origin)
File "/Users/PycharmProjects/venv/lib/python3.9/site-packages/torch/_ops.py", line 1038, in load_library
ctypes.CDLL(path)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ctypes/init.py", line 366, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/PycharmProjects/venv/lib/python3.9/site-packages/torch_scatter/_version_cpu.so, 0x0006): Symbol not found: __ZN3c1017RegisterOperatorsD1Ev
Referenced from: /Users/PycharmProjects/venv/lib/python3.9/site-packages/torch_scatter/_version_cpu.so
Expected in: /Users/PycharmProjects/venv/lib/python3.9/site-packages/torch/lib/libtorch_cpu.dylib

@BlacMountain
Copy link
Author

i can't fix it by changing the version of torch-scatter from 2.2.0 to 1.X.0.

@rusty1s
Copy link
Owner

rusty1s commented Mar 25, 2024

Can you share more information about your PyTorch version, and what the installation log look like if you run via pip install --verbose?

@bybeye
Copy link

bybeye commented Aug 20, 2024

Same issue on MacOS. My PyTorch version is:

torch 2.4.0
torch_geometric 2.5.3
torch_scatter 2.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants