1. 查看pytorch版本
import torch
print (torch.__version__)
2. 安装依赖库
pip install --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-1.9.0+cu111.html
pip install --no-index torch-sparse -f https://pytorch-geometric.com/whl/torch-1.9.0+cu111.html
pip install --no-index torch-cluster -f https://pytorch-geometric.com/whl/torch-1.9.0+cu111.html
pip install --no-index torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.9.0+cu111.html
3. 安装
pip install torch-geometric
4. import报错
import torch_geometric
print (torch_geometric.__version__)
错误如下:
OSError: libcusparse.so.11: cannot open shared object file: No such file or directory
5. 换用conda安装:
conda install -c conda-forge pytorch_geometric
(时间稍长,但还好)
Preparing transaction: done Verifying transaction: done Executing transaction: - By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html / By downloading and using the cuDNN conda packages, you accept the terms and conditions of the NVIDIA cuDNN EULA - https://docs.nvidia.com/deeplearning/cudnn/sla/index.html done
运行报错:
Segmentation fault (core dumped)
待继续解决……



