No module named ‘pytorch-geometric’/'torch_scatte’/ 'torch_scatter.scatter_cuda’即使安装过pytorch-geometric依然报错
原因:pytorch-geometric、torch、cuda版本不对应
解决:按照pytorch-geometric官网安装对应版本的pytorch-geometric
首先查看torch、cuda版本
python -c "import torch; print(torch.__version__)"
python -c "import torch; print(torch.version.cuda)"
![在这里插入图片描述](https://img-blog.csdnimg.cn/969080055e7e486984c66f695e0ca39b.png
然后在官网https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html中选择正确的安装命令。
conda命令安装
conda install pyg -c pyg
安装成功