Linux cuda11.1安装torch_scatter,torch-sparse,torch-cluster,torch-spline-conv,torch-geometric

  1. 创建虚拟环境
conda create -n torch18 python=3.8

进入虚拟环境

source activate torch18
  1. 安装torch1.8.1,可以从https://download.pytorch.org/whl/torch_stable.html中下载
    Linux cuda11.1安装torch_scatter,torch-sparse,torch-cluster,torch-spline-conv,torch-geometric_第1张图片
    下载后直接 pip install whl文件即可

  2. 最关键的,下载torch_scatter,torch-sparse,torch-cluster,torch-spline-conv包,这些包依赖关系非常严重,下错了就是满屏红字。可以从https://pytorch-geometric.com/whl/中下载,找到对应的torch版本,例如我是torch1.8.1,则进入对应的目录
    Linux cuda11.1安装torch_scatter,torch-sparse,torch-cluster,torch-spline-conv,torch-geometric_第2张图片
    出现下面的whl文件
    Linux cuda11.1安装torch_scatter,torch-sparse,torch-cluster,torch-spline-conv,torch-geometric_第3张图片

下载下面的包(亲测有效)

torch_scatter-2.0.6-cp38-cp38-linux_x86_64.whl
torch_sparse-0.6.9-cp38-cp38-linux_x86_64.whl
torch_cluster-1.5.9-cp38-cp38-linux_x86_64.whl
torch_spline_conv-1.2.1-cp38-cp38-linux_x86_64.whl

下载完后直接pip install whl文件

最后直接pip install torch-geometric,不出意外,应该能顺利。

你可能感兴趣的:(pytorch,linux,python,深度学习)