Open Aminoacid1226 opened 1 month ago
You can either do
from torch_geometric.utils import subgraph
or do
import torch_geometric.utils._subgraph
The file was re-named from subgraph
to _subgraph
.
Thank you for your reply, I have solved this problem
😵 Describe the installation problem
I installed four additional dependencies following the tutorial:
**Scatter - 2.1.2 + pt23cu118 - cp38 - cp38 - linux_x86_64. WHL
Torch_sparse 0.6.18 + pt23cu118 cp38 - cp38 - linux_x86_64. WHL
Torch_cluster 1.6.3 + pt23cu118 cp38 - cp38 - linux_x86_64. WHL
Torch_spline_conv 1.2.2 + pt23cu118 cp38 - cp38 - linux_x86_64. WHL**
It is then installed using pip install torch_geometric.
But when I run the file it still says: No module named 'torch_geometric.utils.subgraph'
Excuse me, what's going on here?
**I looked at the file in torch_geometry.utils. There was a file called _subgraph.py.
Why is there still an error?**
Environment
conda
,pip
, source): piptorch-scatter
): scatter-2.1.2+pt23cu118-cp38-cp38-linux_x86_64 sparse-0.6.18+pt23cu118-cp38-cp38-linux_x86_64 cluster-1.6.3+pt23cu118-cp38-cp38-linux_x86_64 spline_conv-1.2.2+pt23cu118-cp38-cp38-linux_x86_64