Python如何安装PyTorch Geometric

方法一

官方链接:installation
Github:https://github.com/rusty1s/pytorch_geometric

方法二

  1. 查看自己主机的cuda版本已经安装好的pytorch的cuda版本
    nvcc --versioncat /usr/local/cuda/version.txt
    python -c "import torch; print(torch.version.cuda)"

2.安装cuda对应的pytorch
不建议pip安装,可以直接到官网找相应的版本下载

版本号和系统对应

  1. 安装torch_geometric
    官网找到合适的版本下载

    然后
    pip install torch-geometric

以下为我安装的文件目录

最后就可以运行GCN啦~

原文地址:https://www.cnblogs.com/gkm0120/p/14580521.html