pytorch_cluster
pytorch_cluster copied to clipboard
Installing torch-cluster
Hello
I'm trying to install torch-cluster for use with torch-geometric within a Python3.8 conda environment on an Apple M1 machine. Within the environment, I'm installing torch-cluster as:
python3 -m pip install torch-cluster
The install runs successfully. However, when trying to import torch_cluster within this conda environment, I receive the following error:
Python 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:05:47)
[Clang 12.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch_cluster
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/krieschenburg/miniforge_x86_64/envs/DND/lib/python3.8/site-packages/torch_cluster/__init__.py", line 18, in <module>
torch.ops.load_library(spec.origin)
File "/Users/krieschenburg/miniforge_x86_64/envs/DND/lib/python3.8/site-packages/torch/_ops.py", line 255, in load_library
ctypes.CDLL(path)
File "/Users/krieschenburg/miniforge_x86_64/envs/DND/lib/python3.8/ctypes/__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/krieschenburg/miniforge_x86_64/envs/DND/lib/python3.8/site-packages/torch_cluster/_fps_cpu.so, 0x0006): Symbol not found: __ZN2at8internal15invoke_parallelExxxRKNSt3__18functionIFvxxEEE
Referenced from: /Users/krieschenburg/miniforge_x86_64/envs/DND/lib/python3.8/site-packages/torch_cluster/_fps_cpu.so
Expected in: /Users/krieschenburg/miniforge_x86_64/envs/DND/lib/python3.8/site-packages/torch/lib/libtorch_cpu.dylib
I'm not sure why this error is arising. However, I have found an installation workaround via
python3 -m pip install torch-cluster --no-cache-dir
When importing torch-cluster after this install, this import works fine. Presumably, something during the wheel build time is producing this error?
It looks like a broken installation has been cached by pip - not sure if there is there is anything to fix on our end. Let me know :)
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?