Motivation
由于本人在安装GCN相关包的过程中,遇到了很多坑,特此记录如下。在装GCN相关包之前,最好新建一个conda环境。
1. 安装全过程 (Linux)
参考链接:简单粗暴2-安装torch_geometric库-Linux-全过程-2021.11.26最新2.0.2版本 - 知乎
2. AttributeError: module 'torch' has no attribute "'sparse_csr'"
原因是torchgeometric的版本过高(2.3.1),解决方案为降低torchgeometric版本。
pip install torch-geometric==2.1.0
3. 主要的package及对应版本
python 3.8.13
torch 1.8.0+cu101
torch-cluster 1.5.9
torch-geometric 2.1.0
torch-scatter 2.0.8
torch-sparse 0.6.12
torch-spline-conv 1.2.1