rusty1s / pytorch_scatter

PyTorch Extension Library of Optimized Scatter Operations
https://pytorch-scatter.readthedocs.io
MIT License
1.5k stars 178 forks source link

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

Open BlacMountain opened 3 months ago

BlacMountain commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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

rusty1s commented 3 months ago

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