rusty1s / pytorch_scatter

PyTorch Extension Library of Optimized Scatter Operations

Home Page:https://pytorch-scatter.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OSError: dlopen.. when import torch_scatter

mlv42 opened this issue · comments

commented

I get the error :

OSError: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/torch_scatter/_version_cpu.so, 0x0006): Symbol not found: __ZN3c1017RegisterOperatorsD1Ev
Referenced from: <85F5D618-9A81-323E-B8CF-4EA588421020> /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/torch_scatter/_version_cpu.so
Expected in: /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/torch/lib/libtorch_cpu.dylib

when I import torch_scatter.
I have:

  • python 3.9.5
  • torch 2.2.1

and I have installed torch_scatter using this line of code:

pip install torch-scatter -f https://data.pyg.org/whl/torch-2.2.2+cpu.html

on a Mac.

How can I fix it? I am sorry but I am not familiar with how these kind of issues work.

How did you install PyTorch? Are you using the conda-forge package?

commented

I used pip install torch and no, I am not using conda-forge . Should I?

No, that sounds good then. Is this ARM or Intel mac?

commented

It's an Intel Mac

Got it. What happens if you simply install via

pip uninstall torch-scatter
pip install torch-scatter
commented

I get the error:

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for torch-scatter
Running setup.py clean for torch-scatter
Failed to build torch-scatter
ERROR: Could not build wheels for torch-scatter, which is required to install pyproject.toml-based projects
Note: you may need to restart the kernel to use updated packages.

when I run pip install torch-scatter after I run pip uninstall torch-scatter.

Sorry for late reply:

Can you run with

pip install --verbose torch-scatter

This should give a more descriptive error message.