此文记录通过二进制文件安装 PyTorch Geometric 的过程
1)确认 PyTorch 是否已经安装,可参考此文安装 PyTorch,比如安装了 PyTorch 1.7.1 cpu 版本
2)确认 所安装的 PyTorch 对应的 CUDA 的版本,比如 CUDA 11.0 或 cpu 版本
3)根据 1)和 2)对应的版本安装以下依赖库
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-geometric
其中,${TORCH} 和 ${CUDA} 分别替换为 1)和 2)中确认的版本
${TORCH} 可选 {1.4.0, 1.5.0, 1.6.0, 1.7.0},PyTorch 1.7.1 选 1.7.0
${CUDA} 可选 {cpu,cu92,cu101,cu102,cu110}
则假设使用 PyTorch 1.7.1 cpu 版本,安装以上依赖为: