'NeighborSampler' requires either 'pyg-lib' or 'torch-sparse' #9143
-
import torch_sparse train_loader = NeighborLoader( Iterate over the train_loader and check for errorsfor i, subgraph in enumerate(train_loader): After running the code, i had this error 'NeighborSampler' requires either 'pyg-lib' or 'torch-sparse'. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
It looks like PyG can find niether pyg-lib nor torch-sparse. Can you share the output of |
Beta Was this translation helpful? Give feedback.
-
Just install pyg cluster sparse and so on before the torch_geometric . |
Beta Was this translation helpful? Give feedback.
-
If you're still searching for a solution, here’s what worked for me:
|
Beta Was this translation helpful? Give feedback.
-
I had the same problem and it was fixed by doing the following in my mac:
If, for any reason, you do not have the directory Python.framework (I did not have it a few days back), I installed python by downloading an installer from Python.org.
note: do all the above in your preferred virtual-env (of 3.10.x). |
Beta Was this translation helpful? Give feedback.
Just install pyg cluster sparse and so on before the torch_geometric .