目录
一、依赖包说明
安装torch-geometric之前,需要先安装torch-scatter
、torch-sparse
、torch-cluster
、torch-spline-conv
务必注意版本号
二、安装
查看自己torch与cuda版本
我的torch版本是1.11.0 cuda是11.5
进入:安装网址
点进去之后有好多
我们只需选择版本号(对应自己的python版本),我选择最高的的,代码如下:
pip install torch-scatter==2.0.9 -f https://pytorch-geometric.com/whl/torch-1.11.0+cu115.html
pip install torch-sparse==0.6.15 -f https://pytorch-geometric.com/whl/torch-1.11.0+cu115.html
pip install torch-cluster==1.6.0 -f https://pytorch-geometric.com/whl/torch-1.11.0+cu115.html
pip install torch-spline-conv==1.2.1 -f https://pytorch-geometric.com/whl/torch-1.11.0+cu115.html
pip install torch-geometric
最后一行pip install torch-geometric执行可能会超时
换成:
pip install torch-geometric -i https://pypi.tuna.tsinghua.edu.cn/simple/
完成