Where is the dgl.nn.pytorch.GraphConv()?


I just wanted to run the example gcn code in dgl-master/examples/pytorch/gcn/train.py
but there was an error:
ImportError: cannot import name ‘GraphConv’ from ‘dgl.nn.pytorch’ (/anaconda3/lib/python3.7/site-packages/dgl/nn/pytorch/init.py)
and I also tried the following code:
from dgl.nn.pytorch.conv import GraphConv
but it didn’t work, either.
What should I do??


Hi, it seems that you need to install the latest version of dgl. I just tried installing dgl with conda and it works.


Thank you!
And I am puzzled about how to update the dgl safely?
Can I use “conda --upgrade dgl?”


Try conda update -c dglteam dgl, if this does not work, you can always uninstall the previous one and reinstall with conda install -c dglteam dgl.


Thx! I have already updated the dgl and run the code:stuck_out_tongue_winking_eye: