1.确定PyTorch版本
python -c "import torch; print(torch.__version__)"
以我的电脑为例:
我的troch环境是1.8.0+cpu,这个参数很重要,后面pytorch-geometric安装要用到
如果你的torch是GPU版本,那么找到cuda版本,比如:cu110
GPU版本的torch查看cuda版本:
python -c "import torch; print(torch.__version__)"
2. 下载pytorch-geometric依赖包
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-${TORCH}+${CUDA}.html
pip install torch-geometric