WXL's blog

Talk is cheap, show me your work.

0%

torch-sparse,torch-scatter,torch-cluster的安装

由于项目环境的需要,我安装了torch 1.6.0版本,CUDA版本为10.2,但是项目需要以下依赖包:

1
2
3
torch_sparse
torch_scatter
torch_cluster

这三个包无法通过pip install来安装,对版本的匹配要求也非常严格,所以本文记录一下安装的过程。

进入以下链接:

pytorch-geometric依赖库

根据自己的torch和cuda版本找到对应的入口:

我是windows、python 37,就下载对应的版本的whl文件:

将三个下载好的文件放入一个路径下,然后切换到那个路径下进行安装:

1
2
3
pip install torch_sparse
pip install torch_scatter
pip install torch_cluster

最后安装geometric:

1
pip install torch-geometric
行行好,赏一杯咖啡吧~