这个 ERROR 可能是由于版本不兼容引起的。可以尝试安装 torch-scatter==1.4.0 和 torch-sparse==0.6.9 以及 torch-spline-conv==1.2.1,而 torch-cluster 则可以保持原版本 1.5.4,命令如下:
pip install torch-scatter==1.4.0 -f https://pytorch-geometric.com/whl/torch-1.7.0+${CUDA}.html
pip install torch-sparse==0.6.9 -f https://pytorch-geometric.com/whl/torch-1.7.0+${CUDA}.html
pip install torch-spline-conv==1.2.1 -f https://pytorch-geometric.com/whl/torch-1.7.0+${CUDA}.html
pip install torch-cluster==1.5.4
其中,${CUDA} 表示 CUDA 版本号,可以根据自己的 CUDA 版本进行替换。如果需要安装的是 CPU 版本,则可以省略 -f 参数和后面的地址。