I'm installing pytorch geometric on Google colab. I've done this lots of times before and had no issues but it has suddenly stopped working. I've not changed my code since it worked. Here is how I install it:
!pip install torch==1.8.1 torchvision torchtext
import torch; print(torch.__version__); print(torch.version.cuda)
!pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.1+cu102.html
!pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.8.1+cu102.html
!pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.8.1+cu102.html
!pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.8.1+cu102.html
!pip install torch-geometric
The pytorch version should be 1.8.1+cu102, confirmed by the print statement above. I specify the version when installing with !pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.1+cu102.html
. However, when I import torch_geometric
I get the error:
Detected that PyTorch and torch_scatter were compiled with different CUDA versions. PyTorch has CUDA version 10.2 and torch_scatter has CUDA version 11.1. Please reinstall the torch_scatter that matches your PyTorch install.
Why is torch_scatter
not compiling with CUDA version 10.2? Is there a way to force it to compile with this version?